xref: /PHP-7.4/Zend/tests/bug47353.phpt (revision 782352c5)
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