3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); foreach (range(1, 1000) as $i) { $a []= new StdClass; $a[$i]->test = $a[$i++]; } print_r($a[0]);
Output for 5.4.0 - 5.6.28, 7.0.0 - 7.1.0
Notice: Undefined offset: 1 in /in/VlY3V on line 6 Warning: Creating default object from empty value in /in/VlY3V on line 6 stdClass Object ( )
Output for hhvm-3.10.0 - 3.12.0
Notice: Undefined index: 1 in /in/VlY3V on line 6 Warning: Creating default object from empty value in /in/VlY3V on line 6 stdClass Object ( )
Output for 5.3.0 - 5.3.29
Notice: Undefined offset: 1 in /in/VlY3V on line 6 Strict Standards: Creating default object from empty value in /in/VlY3V on line 6 stdClass Object ( )
Output for 5.0.0 - 5.2.17
Notice: Undefined offset: 1 in /in/VlY3V on line 6 Strict Standards: Creating default object from empty value in /in/VlY3V on line 6 stdClass Object ( )
Output for 4.3.0 - 4.4.9
Notice: Undefined offset: 1 in /in/VlY3V on line 6 stdClass Object ( )