php-src/Zend/tests/bug37144.phpt

17 lines
264 B
Plaintext
Raw Normal View History

2006-05-16 00:30:37 +08:00
--TEST--
Bug #37144 (PHP crashes trying to assign into property of dead object)
--FILE--
<?php
function foo() {
$x = new stdClass();
$x->bar = array(1);
return $x;
}
foo()->bar[1] = "123";
foo()->bar[0]++;
unset(foo()->bar[0]);
2006-05-16 00:30:37 +08:00
echo "ok\n";
?>
--EXPECT--
ok