ID:               38039
 User updated by:  baldurien at bbnwn dot eu
 Reported By:      baldurien at bbnwn dot eu
 Status:           Open
 Bug Type:         Unknown/Other Function
 Operating System: Windows XP
 PHP Version:      5.1.4
 New Comment:

Forgot to add that thing : 

echo $clazz;


Previous Comments:
------------------------------------------------------------------------

[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

Reply via email to