1--TEST-- 2ArrayObject::__serialize saves any iterator class set by ::setIteratorClass 3--FILE-- 4<?php 5 6class MyArrayIterator extends ArrayIterator {} 7$arrayObject = new ArrayObject(array(1, 2, 3)); 8$arrayObject->setIteratorClass("MyArrayIterator"); 9$serialized = serialize($arrayObject); 10$backAgain = unserialize($serialized); 11echo $backAgain->getIteratorClass(), "\n"; 12 13?> 14--EXPECT-- 15MyArrayIterator 16