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