mirror of
https://github.com/php/php-src.git
synced 2026-03-24 08:12:21 +01:00
RFC: https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_splobjectstoragecontains_splobjectstorageattach_and_splobjectstoragedetach
23 lines
391 B
PHP
23 lines
391 B
PHP
--TEST--
|
|
Bug #69108 ("Segmentation fault" when (de)serializing SplObjectStorage)
|
|
--INI--
|
|
zend.enable_gc=1
|
|
--FILE--
|
|
<?php
|
|
$a = array();
|
|
$b = new SplObjectStorage();
|
|
for ($i = 10000; $i > 0; $i--) {
|
|
$object = new StdClass();
|
|
$a[] = $object;
|
|
$b->offsetSet($object);
|
|
}
|
|
|
|
$c = serialize(array($a, $b));
|
|
$d = unserialize($c);
|
|
|
|
unset($d);
|
|
echo "ok";
|
|
?>
|
|
--EXPECT--
|
|
ok
|