#38039 [Opn->Bgs]: ReflectionCLass can't find "self::" constants
| From: | helly@php.net | Date: | Sat, 08 Jul 2006 15:00:25 +0000 |
| Subject: | #38039 [Opn->Bgs]: ReflectionCLass can't find "self::" constants | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-99234@lists.php.net to get a copy of this message | ||
ID: 38039
Updated by: helly@php.net
Reported By: baldurien at bbnwn dot eu
-Status: Open
+Status: Bogus
Bug Type: Unknown/Other Function
-Operating System: Windows XP
+Operating System: *
-PHP Version: 5.1.4
+PHP Version: *
New Comment:
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to
report
a bug at http://bugs.php.net/how-to-report.php
Read the notice!
Previous Comments:
------------------------------------------------------------------------
[2006-07-08 14:03:00] baldurien at bbnwn dot eu
Forgot to add that thing :
echo $clazz;
------------------------------------------------------------------------
[2006-07-08 13:53:44] baldurien at bbnwn dot eu
Description:
------------
Hi,
When I use the "self::" syntax in function parameter - or a in a
constant - the reflection API fails to find the constant.
Note that when using Foo::X, it works.
Reproduce code:
---------------
class Foo {
const X = 1;
const Y = self::X;
function f($f = self::X) {}
}
$clazz = new ReflectionClass('Foo');
Expected result:
----------------
No notice
Actual result:
--------------
Notice: Use of undefined constant self::X - assumed 'self::X' in
admintools\tests\testmaker.php on line 31
Notice: Use of undefined constant self::X - assumed 'self::X' in
admintools\tests\testmaker.php on line 31
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38039&edit=1