3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $item = 0; $array = ['1', '10', '20', '40']; foreach ($array as &$item) { $item = $item + 10; } $item = 0; var_dump($array);
Output for 5.5.0 - 5.6.30, hhvm-3.10.1 - 3.22.0, 7.0.0 - 7.2.4
array(4) { [0]=> int(11) [1]=> int(20) [2]=> int(30) [3]=> &int(0) }