mirror of
https://github.com/php/php-src.git
synced 2024-12-19 15:00:15 +08:00
27 lines
360 B
Plaintext
27 lines
360 B
Plaintext
|
--TEST--
|
||
|
Bug #47353 (crash when creating a lot of objects in object destructor)
|
||
|
--FILE--
|
||
|
<?php
|
||
|
|
||
|
class A
|
||
|
{
|
||
|
function __destruct()
|
||
|
{
|
||
|
$myArray = array();
|
||
|
|
||
|
for($i = 1; $i <= 3000; $i++) {
|
||
|
if(!isset($myArray[$i]))
|
||
|
$myArray[$i] = array();
|
||
|
$ref = & $myArray[$i];
|
||
|
$ref[] = new stdClass();
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
$a = new A();
|
||
|
|
||
|
echo "Done\n";
|
||
|
?>
|
||
|
--EXPECTF--
|
||
|
Done
|