#42819 [Opn->Asn]: self:: resolves to namespace
| From: | johannes@php.net | Date: | Mon, 01 Oct 2007 19:10:05 +0000 |
| Subject: | #42819 [Opn->Asn]: self:: resolves to namespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-118032@lists.php.net to get a copy of this message | ||
ID: 42819
Updated by: johannes@php.net
Reported By: bs@php.net
-Status: Open
+Status: Assigned
Bug Type: Unknown/Other Function
PHP Version: 5CVS-2007-10-01 (CVS)
-Assigned To:
+Assigned To: dmitry
New Comment:
I can verify the bug, Dmitry please take a look at it, thanks.
Previous Comments:
------------------------------------------------------------------------
[2007-10-01 19:07:35] bs@php.net
Description:
------------
PHP searches for a class named foo when accessing "self::", without the
E_NOTICE this script works as expected
Reproduce code:
---------------
<?php
namespace foo;
class Bar {
static protected
$foo = array(
E_NOTICE => 'foo'
),
$bang = 'bang';
static public function baz() {
echo self::$bang;
}
}
foo::Bar::baz();
Expected result:
----------------
bang
Actual result:
--------------
Fatal error: Class 'foo' not found in ... on line 12
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=42819&edit=1