summaryrefslogtreecommitdiff
path: root/Zend/tests/bug47353.phpt
blob: de5c280e6ade5378ed2ad5d02753b34cf30672dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--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