3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo { public static function bar() { return __METHOD__; } } function call(callable $func) { $func(); } $callableArr = array('Foo', 'bar'); $callableStr = 'Foo::bar'; var_dump(eval('return $callableArr();'); var_dump(eval('return $callableStr();'); var_dump(eval('call($callableArr());')); var_dump(eval('call($callableStr());'));
Output for 5.3.0 - 5.4.21
Parse error: syntax error, unexpected ';' in /in/bsR3Y on line 16
Process exited with code 255.