3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $keys=array("key1","key2","key3"); $array=array(); $array['key1'] = 'value1' $cache=&$array; foreach($keys as $key) { $cache=&$cache[$key]; } $cache="value3"; print_r($array);
Output for 5.4.0 - 5.4.22
Parse error: syntax error, unexpected '$cache' (T_VARIABLE) in /in/1GjV5 on line 5
Process exited with code 255.
Output for 5.3.0 - 5.3.27
Parse error: syntax error, unexpected T_VARIABLE in /in/1GjV5 on line 5
Process exited with code 255.