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 += 'im added'; } return $value; } $y = test(); echo $y;
based on rqr7V
Output for 7.1.0 - 7.2.0
Warning: A non-numeric value encountered in /in/X7Ccb on line 11 Warning: A non-numeric value encountered in /in/X7Ccb on line 11 Warning: A non-numeric value encountered in /in/X7Ccb on line 11 Warning: A non-numeric value encountered in /in/X7Ccb on line 11 Warning: A non-numeric value encountered in /in/X7Ccb on line 11 Warning: A non-numeric value encountered in /in/X7Ccb on line 11 0
Output for 5.5.0 - 7.0.20
0