3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = [1,2,3,4,5]; foreach($a as $k => $v){ $a[$k] = $v * 2; } var_dump($a);
Output for 7.1.7
array(5) { [0]=> int(2) [1]=> int(4) [2]=> int(6) [3]=> int(8) [4]=> int(10) }