- var_dump: documentation ( source)
- call_user_func: documentation ( source)
<?php
namespace Name;
trait Constants {
public static function method () {call_user_func(function () { var_dump(__TRAIT__, __FUNCTION__, __METHOD__); }); }
}
class Foo { use Constants; }
Foo::method();