3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php function test(){ $x = array( 'first' => 'a', 'second' => 'y', 'thrid' => 'z' ); foreach ($x as $key=>$value){ $value += 'f'; } return $x; } $y = test(); echo $y['first'];
based on M4qvI
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 Warning: A non-numeric value encountered in /in/ZgGB3 on line 11 a
Output for 5.3.22 - 7.0.20
a