xref: /PHP-8.3/Zend/tests/bug47353.phpt (revision f8d79582)
1--TEST--
2Bug #47353 (crash when creating a lot of objects in object destructor)
3--FILE--
4<?php
5
6class A
7{
8    function __destruct()
9    {
10        $myArray = array();
11
12        for($i = 1; $i <= 3000; $i++) {
13            if(!isset($myArray[$i]))
14                $myArray[$i] = array();
15            $ref = & $myArray[$i];
16            $ref[] = new stdClass();
17        }
18    }
19}
20
21$a = new A();
22
23echo "Done\n";
24?>
25--EXPECT--
26Done
27