#42820 [Asn->Csd]: defined() on constant with namespace prefixes tries to load class
| From: | dmitry@php.net | Date: | Wed, 03 Oct 2007 10:38:11 +0000 |
| Subject: | #42820 [Asn->Csd]: defined() on constant with namespace prefixes tries to load class | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118137@lists.php.net to get a copy of this message | ||
ID: 42820
Updated by: dmitry@php.net
Reported By: bs@php.net
-Status: Assigned
+Status: Closed
Bug Type: Scripting Engine problem
PHP Version: 5CVS-2007-10-01 (CVS)
Assigned To: dmitry
New Comment:
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
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-10-01 19:23:38] bs@php.net
Description:
------------
i don't know if it's right to expect a class named foo here, but anyway
it should be possible to check for a constant within a namespace
Reproduce code:
---------------
<?php
namespace foo;
var_dump(defined("foo::BAR"));
Expected result:
----------------
false
Actual result:
--------------
Fatal error: Class 'foo' not found in ... on line 3
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42820&edit=1