- var_dump: documentation ( source)
- get_class: documentation ( source)
- sprintf: documentation ( source)
<?php
namespace Name\Space;
class Foo
{
public static function bar()
{
}
}
$reflection = new \ReflectionMethod('Name\\Space\\Foo', 'bar');
$closure = $reflection->getClosure(null);
$reflection2 = new \ReflectionFunction($closure);
echo PHP_EOL;
echo PHP_EOL;
$ReflectionClass = get_class($reflection);
$ReflectionCeption = new \ReflectionClass($ReflectionClass);
foreach ($ReflectionCeption->getMethods(\ReflectionMethod::IS_PUBLIC) as $Method) {
if(!$Method->isStatic() && $Method->getNumberOfParameters() === 0) {
echo sprintf('%s::%s(): ', $ReflectionClass, $Method->name);
var_dump($Method->invoke($reflection));
echo PHP_EOL;
}
}