3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $i = 0; $arr = array(); while ($i < 10) { $arr[] = $i; $arr["$i_key"] = "$i_value"; $i++; } foreach ($arr as $k => $v) { var_dump($k, $v); }
Output for 5.0.4 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 int(0) int(0) string(0) "" string(0) "" int(1) int(1) int(2) int(2) int(3) int(3) int(4) int(4) int(5) int(5) int(6) int(6) int(7) int(7) int(8) int(8) int(9) int(9)
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 int(0) int(0) string(0) "" string(0) "" int(1) int(1) int(2) int(2) int(3) int(3) int(4) int(4) int(5) int(5) int(6) int(6) int(7) int(7) int(8) int(8) int(9) int(9)
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 Notice: Undefined variable: i_key in /in/A2DtB on line 6 Notice: Undefined variable: i_value in /in/A2DtB on line 6 int(0) int(0) string(0) "" string(0) "" int(1) int(1) int(2) int(2) int(3) int(3) int(4) int(4) int(5) int(5) int(6) int(6) int(7) int(7) int(8) int(8) int(9) int(9)