3v4l.org

run code in 300+ PHP versions simultaneously
<?php function call($name, $method, $args, $ref, $context, $class) { var_dump($name, $method, $context, $class); return call_user_func_array(array($name, $method), $args); } class Foo_2e0af02066baec452cc22d76d0dbe2d7 { public static function foo() { return call('static', 'bar', array(), array(), @get_called_class(), __CLASS__); } } class Foo_dd0a956520946526fec64c726f93ed58 extends Foo_2e0af02066baec452cc22d76d0dbe2d7 { protected static function bar() { return __CLASS__; } } echo call('Foo_dd0a956520946526fec64c726f93ed58', 'foo', array(), array(), @get_called_class(), __CLASS__);

preferences:
36.26 ms | 402 KiB | 5 Q