incomplete_class.phpt 1.2 KB

123456789101112131415161718192021222324252627
  1. --TEST--
  2. (un)serializing __PHP_Incomplete_Class instance
  3. --FILE--
  4. <?php
  5. $d = serialize(new __PHP_Incomplete_Class);
  6. $o = unserialize($d);
  7. var_dump($o);
  8. $o->test = "a";
  9. var_dump($o->test);
  10. var_dump($o->test2);
  11. echo "Done\n";
  12. ?>
  13. --EXPECTF--
  14. object(__PHP_Incomplete_Class)#%d (0) {
  15. }
  16. 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
  17. 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
  18. NULL
  19. 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
  20. NULL
  21. Done