|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
[2018-12-20 23:37 UTC] cmb@php.net
-PHP Version: 7.3.0
+PHP Version: 7.2
[2018-12-27 03:24 UTC]
[2021-05-22 09:11 UTC] krakjoe@php.net
-Status: Open
+Status: Wont fix
[2021-05-22 09:11 UTC] krakjoe@php.net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 07:00:01 2025 UTC |
Description: ------------ ReflectionClass::getReflectionConstant() returns false when constant is not found. This is unexpected because all other methods like getMethod() or getProperty() which have equivalent signatures and fuction throw a ReflectionException. The return value is also not documented. Test script: --------------- ``` <?php class Foo {} $barClassReflection = new ReflectionClass(Foo::class); var_dump($barClassReflection->getReflectionConstant('XXX')); ``` https://3v4l.org/k09Q8 Expected result: ---------------- Throw exception like the other methods on ReflectionClass to behave consistently and document this behavior.