3v4l.org

run code in 300+ PHP versions simultaneously
<?php $ar = ['a','b','c']; $arr =& $ar; // both are now references foreach ($arr as $dummy) { $arr []= 'foo'; } var_dump($arr);

preferences:
72.29 ms | 407 KiB | 5 Q