3v4l.org

run code in 300+ PHP versions simultaneously
<?php class Testme { public static function foo(&$ref) { $ref = 1; } } class Invoker { public static function invoke($func_name) { $args = func_get_args(); call_user_func_array(array('Testme', $func_name), &array_slice($args,1)); } } $test = 2; Invoker::invoke('foo', $test); var_dump($test);
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.19
Fatal error: Can't use function return value in write context in /in/4YpMe on line 11
Process exited with code 255.

preferences:
183.93 ms | 940 KiB | 56 Q