- var_dump: 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);
$reflection3 = new \ReflectionFunction(function () {});
var_dump($closure, $reflection, $reflection2, $reflection3);