xref: /PHP-7.4/ext/spl/tests/bug69108.phpt (revision ffdc5728)
1--TEST--
2Bug #69108 ("Segmentation fault" when (de)serializing SplObjectStorage)
3--INI--
4zend.enable_gc=1
5--FILE--
6<?php
7$a = array();
8$b = new SplObjectStorage();
9for ($i = 10000; $i > 0; $i--) {
10	    $object = new StdClass();
11		    $a[] = $object;
12		    $b->attach($object);
13}
14
15$c = serialize(array($a, $b));
16$d = unserialize($c);
17
18unset($d);
19echo "ok";
20?>
21--EXPECT--
22ok
23