3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Foo{ public static function Bar(){ echo 'Bar'; } } function sillyboy(){ echo 'sillyboy'; } funcion inc(&$p1){ $p1++; } $f = 'Foo::Bar'; $f2 = 'sillyboy'; if (is_callable($f)){ call_user_func($f); } if (is_callable($f2)){ call_user_func($f2); } $num = 3; call_user_func('inc', $num); echo $num;
Output for 5.4.0 - 5.4.17
Parse error: syntax error, unexpected 'inc' (T_STRING) in /in/nfeVf on line 14
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_STRING in /in/nfeVf on line 14
Process exited with code 255.