#47593 [Opn->Ver]: interface_exists() returns false when using absolute namespace path

From: Date: Sun, 08 Mar 2009 08:21:36 +0000
Subject: #47593 [Opn->Ver]: interface_exists() returns false when using absolute namespace path
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-134477@lists.php.net to get a copy of this message
ID: 47593 Updated by: kalle@php.net Reported By: crystality at mail dot ru -Status: Open +Status: Verified Bug Type: Class/Object related Operating System: WinXpSP3 PHP Version: 5.3CVS-2009-03-08 (snap) New Comment: The following patch is just a port of the patch for class_exists() that resolves the bug: http://paste2.org/p/160586 - PHP_5_3 Previous Comments: ------------------------------------------------------------------------ [2009-03-08 00:14:50] crystality at mail dot ru Description: ------------ Looks like this is the windows version of bug #46813. Function interface_exists() used without autoloading returns FALSE whith a fully qualified namespace. class_exists() works ok. Well interface_exists() does work too but as long as leading backslash isn't there or with autoloading enabled. Reproduce code: --------------- namespace interfaces; interface debug{} var_dump(interface_exists("\interfaces\debug", false)); // FALSE Expected result: ---------------- True Actual result: -------------- False ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47593&edit=1

« previous php.bugs (#134477) next »