|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47593 interface_exists() returns false when using absolute namespace path
Submitted: 2009-03-08 00:14 UTC Modified: 2009-03-08 17:29 UTC
Avg. Score:4.5 ± 0.5
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: crystality at mail dot ru Assigned: felipe (profile)
Status: Closed Package: Class/Object related
PHP Version: 5.3CVS-2009-03-08 (snap) OS: WinXpSP3
Private report: No CVE-ID: None
 [2009-03-08 00:14 UTC] crystality at mail dot ru
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:

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-03-08 08:21 UTC]
The following patch is just a port of the patch for class_exists() that resolves the bug: - PHP_5_3
 [2009-03-08 14:19 UTC] crystality at mail dot ru
When will a snapshot be available with the bug fixed?
 [2009-03-08 17:29 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 17:01:32 2024 UTC