xref: /PHP-8.1/ext/spl/tests/bug78409.phpt (revision 34885408)
1--TEST--
2Bug #78409: Segfault when creating instance of ArrayIterator without constructor
3--FILE--
4<?php
5
6$a = new ArrayObject;
7$u = [
8    0,
9    [],
10    [],
11];
12$a->__unserialize($u);
13var_dump($u);
14
15?>
16--EXPECT--
17array(3) {
18  [0]=>
19  int(0)
20  [1]=>
21  array(0) {
22  }
23  [2]=>
24  array(0) {
25  }
26}
27