3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php function foo() { static $array = array(); while ($i < 10000) { $array[] = $i; $i++; } $key = 9999; echo array_key_exists($key, $array); } foo();
based on 77006
Output for 5.0.4 - 7.1.0
Notice: Undefined variable: i in /in/gDWYY on line 7 Notice: Undefined variable: i in /in/gDWYY on line 8 Notice: Undefined variable: i in /in/gDWYY on line 9 1
Output for 4.3.0 - 5.0.3
Notice: Undefined variable: i in /in/gDWYY on line 7 Notice: Undefined variable: i in /in/gDWYY on line 8 Notice: Undefined variable: i in /in/gDWYY on line 9 1