Return to incomplete_class.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / serialize |
1.1 misho 1: --TEST-- 2: (un)serializing __PHP_Incomplete_Class instance 3: --FILE-- 4: <?php 5: 6: $d = serialize(new __PHP_Incomplete_Class); 7: $o = unserialize($d); 8: var_dump($o); 9: 10: $o->test = "a"; 11: var_dump($o->test); 12: var_dump($o->test2); 13: 14: echo "Done\n"; 15: ?> 16: --EXPECTF-- 17: object(__PHP_Incomplete_Class)#%d (0) { 18: } 19: 20: Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line %d 21: 22: Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line %d 23: NULL 24: 25: Notice: main(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition "unknown" of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in %s on line %d 26: NULL 27: Done