xref: /PHP-7.4/Zend/tests/bug71539_5.phpt (revision e63febb1)
1--TEST--
2Bug #71539.5 (Memory error on $arr[$a] =& $arr[$b] if RHS rehashes)
3--FILE--
4<?php
5$array = [];
6$array['']->prop =& $array[0];
7$array[0] = 42;
8var_dump($array);
9?>
10--EXPECTF--
11Warning: Creating default object from empty value in %sbug71539_5.php on line 3
12array(2) {
13  [0]=>
14  &int(42)
15  [""]=>
16  object(stdClass)#1 (1) {
17    ["prop"]=>
18    &int(42)
19  }
20}
21