3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class A { public static function testFunc($name) { echo "hello " . $name . ' !!'; } } class B { public function testAnotherFunc(callable $funcName) { $funcName('Percy'); } } $b = new B(); $b->testAnotherFunc(array(static(A), 'testFunc'));
Output for 5.4.0 - 5.4.20
Parse error: syntax error, unexpected '(', expecting :: (T_PAAMAYIM_NEKUDOTAYIM) in /in/FS7MW on line 25
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected '(', expecting T_PAAMAYIM_NEKUDOTAYIM in /in/FS7MW on line 25
Process exited with code 255.