Return to interface_exists_variation3.phpt CVS log | Up to [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / standard / tests / class_object |
1.1 misho 1: --TEST-- 2: Test interface_exists() function : autoloaded interface 3: --FILE-- 4: <?php 5: /* Prototype : bool interface_exists(string classname [, bool autoload]) 6: * Description: Checks if the class exists 7: * Source code: Zend/zend_builtin_functions.c 8: * Alias to functions: 9: */ 10: 11: echo "*** Testing interface_exists() : autoloaded interface ***\n"; 12: 13: function __autoload($class_name) { 14: require_once $class_name . '.inc'; 15: } 16: 17: echo "\n-- no autoloading --\n"; 18: var_dump(interface_exists("AutoInterface", false)); 19: 20: echo "\n-- with autoloading --\n"; 21: var_dump(interface_exists("AutoInterface", true)); 22: 23: echo "\nDONE\n"; 24: 25: ?> 26: --EXPECTF-- 27: *** Testing interface_exists() : autoloaded interface *** 28: 29: -- no autoloading -- 30: bool(false) 31: 32: -- with autoloading -- 33: bool(true) 34: 35: DONE