Annotation of embedaddon/php/ext/standard/tests/serialize/bug45706.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #45706 Unserialization of classes derived from ArrayIterator fails
! 3: --FILE--
! 4: <?php
! 5: class Foo1 extends ArrayIterator
! 6: {
! 7: }
! 8: class Foo2 {
! 9: }
! 10: $x = array(new Foo1(),new Foo2);
! 11: $s = serialize($x);
! 12: $s = str_replace("Foo", "Bar", $s);
! 13: $y = unserialize($s);
! 14: var_dump($y);
! 15: --EXPECTF--
! 16: Warning: Class __PHP_Incomplete_Class has no unserializer in %sbug45706.php on line %d
! 17: array(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: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>