3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $a = array(); foreach (range(1, 1000) as $i) { $a []= new StdClass; $a[$i]->test = $a[$i++]; } var_dump($a);
Output for 7.0.20 - 7.2.0
Notice: Undefined offset: 1 in /in/23VG2 on line 6 Warning: Creating default object from empty value in /in/23VG2 on line 6 array(1001) { [0]=> object(stdClass)#1 (0) { } [2]=> object(stdClass)#2 (1) { ["test"]=> NULL } [3]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } [4]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } [5]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } [6]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } [7]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } [8]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } [9]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } [10]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } [11]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } [12]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } [13]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } [14]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } [15]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } [16]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } [17]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } [18]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } [19]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } [20]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } [21]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } [22]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } } [23]=> object(stdClass)#23 (1) { ["test"]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } } } [24]=> object(stdClass)#24 (1) { ["test"]=> object(stdClass)#23 (1) { ["test"]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } } } } [25]=> object(stdClass)#25 (1) { ["test"]=> object(stdClass)#24 (1) { ["test"]=> object(stdClass)#23 (1) { ["test"]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } } } } } [26]=> object(stdClass)#26 (1) { ["test"]=> object(stdClass)#25 (1) { ["test"]=> object(stdClass)#24 (1) { ["test"]=> object(stdClass)#23 (1) { ["test"]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) { ["test"]=> object(stdClass)#14 (1) { ["test"]=> object(stdClass)#13 (1) { ["test"]=> object(stdClass)#12 (1) { ["test"]=> object(stdClass)#11 (1) { ["test"]=> object(stdClass)#10 (1) { ["test"]=> object(stdClass)#9 (1) { ["test"]=> object(stdClass)#8 (1) { ["test"]=> object(stdClass)#7 (1) { ["test"]=> object(stdClass)#6 (1) { ["test"]=> object(stdClass)#5 (1) { ["test"]=> object(stdClass)#4 (1) { ["test"]=> object(stdClass)#3 (1) { ["test"]=> object(stdClass)#2 (1) { ["test"]=> NULL } } } } } } } } } } } } } } } } } } } } } } } } } [27]=> object(stdClass)#27 (1) { ["test"]=> object(stdClass)#26 (1) { ["test"]=> object(stdClass)#25 (1) { ["test"]=> object(stdClass)#24 (1) { ["test"]=> object(stdClass)#23 (1) { ["test"]=> object(stdClass)#22 (1) { ["test"]=> object(stdClass)#21 (1) { ["test"]=> object(stdClass)#20 (1) { ["test"]=> object(stdClass)#19 (1) { ["test"]=> object(stdClass)#18 (1) { ["test"]=> object(stdClass)#17 (1) { ["test"]=> object(stdClass)#16 (1) { ["test"]=> object(stdClass)#15 (1) {
Process exited with code 137.