3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $a = array(); $a[10]->b[] = 1; $a[10]->sum += 500; var_dump($a);
based on 2oVsK
Output for 5.5.24 - 7.1.0
Notice: Undefined property: stdClass::$sum in /in/bk9UR on line 4 array(1) { [10]=> object(stdClass)#1 (2) { ["b"]=> array(1) { [0]=> int(1) } ["sum"]=> int(500) } }
Output for 5.0.0 - 5.4.45
array(1) { [10]=> object(stdClass)#1 (2) { ["b"]=> array(1) { [0]=> int(1) } ["sum"]=> int(500) } }
Output for 4.3.0 - 4.4.9
Notice: Undefined property: sum in /in/bk9UR on line 4 array(1) { [10]=> object(stdClass)(2) { ["b"]=> array(1) { [0]=> int(1) } ["sum"]=> int(500) } }