|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-08 14:03 UTC] baldurien at bbnwn dot eu
[2006-07-08 15:00 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 14:00:01 2025 UTC |
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