xref: /PHP-8.3/ext/spl/tests/gh13531.phpt (revision 8494058a)
1--TEST--
2GH-13531 (Unable to resize SplfixedArray after being unserialized in PHP 8.2.15)
3--FILE--
4<?php
5
6$array = new SplFixedArray(5);
7$array[4] = 1;
8$serialized = serialize($array);
9$unserialized = unserialize($serialized);
10$unserialized->setSize(6);
11var_dump($unserialized);
12
13?>
14--EXPECT--
15object(SplFixedArray)#2 (6) {
16  [0]=>
17  NULL
18  [1]=>
19  NULL
20  [2]=>
21  NULL
22  [3]=>
23  NULL
24  [4]=>
25  int(1)
26  [5]=>
27  NULL
28}
29