3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $keys=array("key1","key2","key3"); $array=array(); $cache=&$array; foreach($keys as $key) { $cache=&$cache[$key]; } $cache="value"; print_r($array);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [key1] => Array ( [key2] => Array ( [key3] => value ) ) )