3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $array = array(1, 2, 3, 4, 5); foreach ($array as $item) { echo "$item\n"; $array[] = $item; } foreach ($array as $item) { echo "$item\n"; }
Output for 4.3.0 - 7.1.0
1 2 3 4 5 1 2 3 4 5 1 2 3 4 5