3v4l.org

run code in 300+ PHP versions simultaneously
<?php $arr = array(1,2,3,4,5,6,7,8,9); foreach($arr as &$key=>$value) { unset($arr[$key + 1]); echo $value . PHP_EOL; } ?>
Output for 5.3.0 - 5.3.27, 5.4.0 - 5.4.22
Fatal error: Key element cannot be a reference in /in/scfna on line 5
Process exited with code 255.

preferences:
179.99 ms | 1395 KiB | 58 Q