![]() ![]() | ![]() |
1.1 ! misho 1: --TEST-- ! 2: Bug #37144 (PHP crashes trying to assign into property of dead object) ! 3: --FILE-- ! 4: <?php ! 5: function foo() { ! 6: $x = new stdClass(); ! 7: $x->bar = array(1); ! 8: return $x; ! 9: } ! 10: foo()->bar[1] = "123"; ! 11: foo()->bar[0]++; ! 12: unset(foo()->bar[0]); ! 13: echo "ok\n"; ! 14: ?> ! 15: --EXPECT-- ! 16: ok