Return to bug27469.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / serialize |
1.1 misho 1: --TEST-- 2: Bug #27469 (serialize() objects of incomplete class) 3: --FILE-- 4: <?php 5: $str = 'O:9:"TestClass":0:{}'; 6: $obj = unserialize($str); 7: var_dump($obj); 8: echo serialize($obj)."\n"; 9: var_dump($obj); 10: echo serialize($obj)."\n"; 11: var_dump($obj); 12: ?> 13: --EXPECT-- 14: object(__PHP_Incomplete_Class)#1 (1) { 15: ["__PHP_Incomplete_Class_Name"]=> 16: string(9) "TestClass" 17: } 18: O:9:"TestClass":0:{} 19: object(__PHP_Incomplete_Class)#1 (1) { 20: ["__PHP_Incomplete_Class_Name"]=> 21: string(9) "TestClass" 22: } 23: O:9:"TestClass":0:{} 24: object(__PHP_Incomplete_Class)#1 (1) { 25: ["__PHP_Incomplete_Class_Name"]=> 26: string(9) "TestClass" 27: }