#42820 [Opn->Asn]: defined() on constant with namespace prefixes tries to load class

From: Date: Tue, 02 Oct 2007 09:25:23 +0000
Subject: #42820 [Opn->Asn]: defined() on constant with namespace prefixes tries to load class
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-118051@lists.php.net to get a copy of this message
ID: 42820 Updated by: tony2001@php.net Reported By: bs@php.net -Status: Open +Status: Assigned Bug Type: Scripting Engine problem PHP Version: 5CVS-2007-10-01 (CVS) -Assigned To: +Assigned To: dmitry 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

« previous php.bugs (#118051) next »