- var_dump: documentation ( source)
<?php
namespace Name;
function Boo() {
var_dump('func:', __FUNCTION__, __METHOD__);
}
trait Constants {
public static function traitC () { return __METHOD__; }
}
class Foo {
//use Constants;
public function method () {
return function () { var_dump(__FUNCTION__, __METHOD__); };
}
}
$stdClass = new \stdClass();
$closure = (new Foo())->method();
$closure();
$closure = $closure->bindTo($stdClass);
$closure();
$ref = new \ReflectionFunction($closure);
var_dump($ref->getName());