3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $items=array("a", "b", "c", "d"); for ($i=0;$i<4;$i++) { $item=&$items[$i]; //if (!isset($item)) $item=$j."_".$i; $item=$item.$item; } print_r($items); foreach ($items as $item) echo $item."\n"; print_r($items);
Output for 4.3.0 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Array ( [0] => aa [1] => bb [2] => cc [3] => dd ) aa bb cc cc Array ( [0] => aa [1] => bb [2] => cc [3] => cc )