3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $values = array(1 => 'a', 2 => 'b', 3 => 'c'); while (list($key, $value) = each($values)) { echo "$key => $value \r\n"; if ($key == 3) { $values[4] = 'd'; } if ($key == 4) { $values[5] = 'e'; } }
Output for 4.3.0 - 5.6.28, hhvm-3.12.0, 7.0.0 - 7.1.0
1 => a 2 => b 3 => c 4 => d 5 => e
Output for hhvm-3.10.0

Process exited with code 153.