3v4l.org

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