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--EXPECTF-- 16Warning: Class __PHP_Incomplete_Class has no unserializer in %sbug45706.php on line %d 17array(2) { 18 [0]=> 19 object(__PHP_Incomplete_Class)#%d (1) { 20 ["__PHP_Incomplete_Class_Name"]=> 21 string(4) "Bar1" 22 } 23 [1]=> 24 object(__PHP_Incomplete_Class)#%d (1) { 25 ["__PHP_Incomplete_Class_Name"]=> 26 string(4) "Bar2" 27 } 28} 29