--TEST-- serialize()/unserialize() objects --FILE-- --EXPECTF-- Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d ===O1=== TestOld::__sleep() string(18) "O:7:"TestOld":0:{}" TestOld::__wakeup() object(TestOld)#%d (0) { } ===N1=== TestNew::serialize() string(2) "N;" NULL ===N2=== TestNew::serialize() string(19) "C:7:"TestNew":1:{2}" TestNew::unserialize() object(TestNew)#%d (0) { } ===NAOld=== unserializer(TestNAOld) TestOld::__wakeup() object(TestNAOld)#%d (0) { } ===NANew=== unserializer(TestNANew) Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d Warning: Erroneous data format for unserializing 'TestNANew' in %s005.php on line %d Notice: unserialize(): Error at offset 19 of 20 bytes in %s005.php on line %d bool(false) ===NANew2=== unserializer(TestNANew2) Deprecated: %s implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in %s on line %d TestNew::unserialize() object(TestNANew2)#%d (0) { } ===AutoOld=== unserializer(autoload_implements) Try autoloader do_autoload(autoload_interface) do_autoload(autoload_implements) object(autoload_implements)#%d (0) { } ===AutoNA=== do_autoload(autoload_not_available) unserializer(autoload_not_available) Try autoloader do_autoload(autoload_not_available) do_autoload(autoload_not_available) Warning: unserialize(): Function unserializer() hasn't defined the class it was called for in %s005.php on line %d object(__PHP_Incomplete_Class)#%d (1) { ["__PHP_Incomplete_Class_Name"]=> string(22) "autoload_not_available" }