3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?hh $foo = 'bar'; $array = [1,2,3]; foreach ($array as &$foo) { $foo = $foo * $foo; } var_dump($foo); $foo = 'derp'; var_dump($array);
based on EPEgK
Output for 5.4.0 - 5.4.32
<?hh $foo = 'bar'; $array = [1,2,3]; foreach ($array as &$foo) { $foo = $foo * $foo; } var_dump($foo); $foo = 'derp'; var_dump($array);