3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $array = ['EzEz' => 1, 'EzFY' => 2, 'FYEz' => 3]; foreach ($array as &$value) { unset($array['EzFY']); $array['FYFY'] = 4; var_dump($value); } // output: 1, 4
based on VpeTU
Output for 7.0.0 - 7.2.0
int(1) int(3) int(4)
Output for 5.4.11 - 5.6.28
int(1) int(4)
Output for 5.3.21 - 5.3.29
Parse error: syntax error, unexpected '[' in /in/5rrvu on line 3
Process exited with code 255.