bug64354.phpt 437 B

123456789101112131415161718192021222324
  1. --TEST--
  2. Bug #64354 (Unserialize array of objects whose class can't be autoloaded fail)
  3. --FILE--
  4. <?php
  5. class B implements Serializable {
  6. public function serialize() {
  7. throw new Exception("serialize");
  8. return NULL;
  9. }
  10. public function unserialize($data) {
  11. }
  12. }
  13. $data = array(new B);
  14. try {
  15. serialize($data);
  16. } catch (Exception $e) {
  17. var_dump($e->getMessage());
  18. }
  19. ?>
  20. --EXPECT--
  21. string(9) "serialize"