#47593 [Ver->Asn]: interface_exists() returns false when using absolute namespace path
| From: | felipe@php.net | Date: | Sun, 08 Mar 2009 16:58:47 +0000 |
| Subject: | #47593 [Ver->Asn]: interface_exists() returns false when using absolute namespace path | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134492@lists.php.net to get a copy of this message | ||
ID: 47593
Updated by: felipe@php.net
Reported By: crystality at mail dot ru
-Status: Verified
+Status: Assigned
Bug Type: Class/Object related
Operating System: WinXpSP3
PHP Version: 5.3CVS-2009-03-08 (snap)
-Assigned To:
+Assigned To: felipe
Previous Comments:
------------------------------------------------------------------------
[2009-03-08 14:19:05] crystality at mail dot ru
When will a snapshot be available with the bug fixed?
------------------------------------------------------------------------
[2009-03-08 08:21:35] kalle@php.net
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
------------------------------------------------------------------------
[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