mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Second pass through `Zend/tests/bug*` to organize the tests. Move tests to existing sub directories, and create some new sub directories: * `ArrayAccess` * `autoload` * `clone` * `serialize` (also covers `unserialize()`) * `switch` Work towards GH-15631
27 lines
424 B
PHP
27 lines
424 B
PHP
--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";
|
|
?>
|
|
--EXPECT--
|
|
Done
|