1--TEST-- 2Test 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 11echo "*** Testing interface_exists() : autoloaded interface ***\n"; 12 13spl_autoload_register(function ($class_name) { 14 require_once $class_name . '.inc'; 15}); 16 17echo "\n-- no autoloading --\n"; 18var_dump(interface_exists("AutoInterface", false)); 19 20echo "\n-- with autoloading --\n"; 21var_dump(interface_exists("AutoInterface", true)); 22 23echo "\nDONE\n"; 24 25?> 26--EXPECT-- 27*** Testing interface_exists() : autoloaded interface *** 28 29-- no autoloading -- 30bool(false) 31 32-- with autoloading -- 33bool(true) 34 35DONE 36