--TEST-- Test that reflection can get default values --SKIPIF-- --FILE-- getMethods() as $reflectionMethod) { $parameters = $reflectionMethod->getParameters(); foreach ($parameters as $parameter) { if ($parameter->isDefaultValueAvailable() !== true) { continue; } try { $value = $parameter->getDefaultValue(); } catch (ReflectionException $re) { $method_name = $reflectionMethod->getName(); echo "Exception for $class::$method_name : " . $re->getMessage() . "\n"; } } } } echo "Ok"; ?> --EXPECTF-- Ok