3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php class A { public static function putain($a, &$b) { var_dump($a); var_dump($b); } } $callable = ["A::putain"]; $var = "shit"; $callable("alma", $var);
based on bUdYa
Output for 7.0.0 - 7.3.0alpha1
Fatal error: Uncaught Error: Function name must be a string in /in/ULiPW:12 Stack trace: #0 {main} thrown in /in/ULiPW on line 12
Process exited with code 255.
Output for 5.4.13 - 5.6.28
Fatal error: Function name must be a string in /in/ULiPW on line 12
Process exited with code 255.
Output for 5.3.23 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/ULiPW on line 10
Process exited with code 255.