3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo($array) { $array['extra'] = 'extra'; return $array; } function bar(&$array) { $array['extra'] = 'extra'; }ds $foo = array('test_foo' => 'test_foo'); $bar = array('test_bar' => 'test_bar'); $foo = foo($foo); bar($bar); print_r($foo); print_r($bar); ?>
Output for 5.4.0 - 5.4.26
Parse error: syntax error, unexpected '$foo' (T_VARIABLE) in /in/CC8d1 on line 12
Process exited with code 255.
Output for 5.3.0 - 5.3.28
Parse error: syntax error, unexpected T_VARIABLE in /in/CC8d1 on line 12
Process exited with code 255.