1--TEST--
2Bug #45706 Unserialization of classes derived from ArrayIterator fails
3--FILE--
4<?php
5class Foo1 extends ArrayIterator
6{
7}
8class Foo2 {
9}
10$x = array(new Foo1(),new Foo2);
11$s = serialize($x);
12$s = str_replace("Foo", "Bar", $s);
13$y = unserialize($s);
14var_dump($y);
15?>
16--EXPECT--
17array(2) {
18  [0]=>
19  object(__PHP_Incomplete_Class)#3 (5) {
20    ["__PHP_Incomplete_Class_Name"]=>
21    string(4) "Bar1"
22    ["0"]=>
23    int(0)
24    ["1"]=>
25    array(0) {
26    }
27    ["2"]=>
28    array(0) {
29    }
30    ["3"]=>
31    NULL
32  }
33  [1]=>
34  object(__PHP_Incomplete_Class)#4 (1) {
35    ["__PHP_Incomplete_Class_Name"]=>
36    string(4) "Bar2"
37  }
38}
39