1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00
Files
archived-php-src/ext/spl/tests/bug77298.phpt
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00

30 lines
508 B
PHP

--TEST--
Bug #77298 (segfault occurs when add property to unserialized ArrayObject)
--FILE--
<?php
$o = new ArrayObject();
$o2 = unserialize(serialize($o));
$o2[1]=123;
var_dump($o2);
$o3 = new ArrayObject();
$o3->unserialize($o->serialize());
$o3['xm']=456;
var_dump($o3);
?>
--EXPECT--
object(ArrayObject)#2 (1) {
["storage":"ArrayObject":private]=>
array(1) {
[1]=>
int(123)
}
}
object(ArrayObject)#3 (1) {
["storage":"ArrayObject":private]=>
array(1) {
["xm"]=>
int(456)
}
}