--TEST-- ReflectionParameter::getDefaultValueConstant() should raise exception on non optional parameter --FILE-- getParameters() as $param) { try { echo $param->getDefaultValueConstantName() . "\n"; } catch(ReflectionException $e) { echo $e->getMessage() . "\n"; } } ?> --EXPECT-- Internal error: Failed to retrieve the default value CONST_TEST_1