3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $x = new stdClass(); $x->r = 'rrr'; $x->g = 40; $a = array(); $a[10]->b[] = 1; $a[10]->sum += 500; print_r($a);
based on R1stn
Output for 5.5.24 - 7.1.0
Notice: Undefined property: stdClass::$sum in /in/pMa74 on line 7 Array ( [10] => stdClass Object ( [b] => Array ( [0] => 1 ) [sum] => 500 ) )
Output for 5.0.0 - 5.4.45
Array ( [10] => stdClass Object ( [b] => Array ( [0] => 1 ) [sum] => 500 ) )
Output for 4.3.0 - 4.4.9
Notice: Undefined property: sum in /in/pMa74 on line 7 Array ( [10] => stdClass Object ( [b] => Array ( [0] => 1 ) [sum] => 500 ) )