3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php class Testme { public static function foo(&$ref) { $ref = 1; } } class Invoker { public static function invoke($func_name) { $trace = debug_backtrace(); $args= $trace[1]['args']; call_user_func_array(array('Testme', $func_name), $args); } } test = 2; $testRef = &$test; Invoker::invoke('foo', $testRef); var_dump($test);
Output for 5.3.0 - 5.4.19
Parse error: syntax error, unexpected '=' in /in/epuhH on line 16
Process exited with code 255.