Annotation of embedaddon/php/ext/standard/tests/serialize/bug30234.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #30234 (__autoload() not invoked for interfaces)
! 3: --SKIPIF--
! 4: <?php
! 5: if (class_exists('autoload_root', false)) die('skip Autoload test classes exist already');
! 6: ?>
! 7: --FILE--
! 8: <?php
! 9:
! 10: function __autoload($class_name)
! 11: {
! 12: require_once(dirname(__FILE__) . '/' . strtolower($class_name) . '.p5c');
! 13: echo __FUNCTION__ . '(' . $class_name . ")\n";
! 14: }
! 15:
! 16: var_dump(interface_exists('autoload_interface', false));
! 17: var_dump(class_exists('autoload_implements', false));
! 18:
! 19: $o = unserialize('O:19:"Autoload_Implements":0:{}');
! 20:
! 21: var_dump($o);
! 22: var_dump($o instanceof autoload_interface);
! 23: unset($o);
! 24:
! 25: var_dump(interface_exists('autoload_interface', false));
! 26: var_dump(class_exists('autoload_implements', false));
! 27:
! 28: ?>
! 29: ===DONE===
! 30: --EXPECTF--
! 31: bool(false)
! 32: bool(false)
! 33: __autoload(autoload_interface)
! 34: __autoload(Autoload_Implements)
! 35: object(autoload_implements)#%d (0) {
! 36: }
! 37: bool(true)
! 38: bool(true)
! 39: bool(true)
! 40: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>