#47593 [Ver]: interface_exists() returns false when using absolute namespace path
ID: 47593
User updated by: crystality at mail dot ru
Reported By: crystality at mail dot ru
Status: Verified
Bug Type: Class/Object related
Operating System: WinXpSP3
PHP Version: 5.3CVS-2009-03-08 (snap)
New Comment:
When will a snapshot be available with the bug fixed?
Previous Comments:
------------------------------------------------------------------------
[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
Thread (5 messages)