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=&$item[$i]; $item=$item.$item; } print_r($items); foreach ($items as $item) echo $item."\n"; print_r($items);
Output for 7.1.0
Fatal error: Uncaught Error: Cannot create references to/from string offsets in /in/vJfKI:4 Stack trace: #0 {main} thrown in /in/vJfKI on line 4
Process exited with code 255.
Output for 4.3.0 - 7.0.14
Array ( [0] => a [1] => b [2] => c [3] => d ) a b c d Array ( [0] => a [1] => b [2] => c [3] => d )