|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-07-04 08:01 UTC] nikic@php.net
-Status: Open
+Status: Wont fix
[2019-07-04 08:01 UTC] nikic@php.net
[2019-07-04 08:11 UTC] zerkms at zerkms dot ru
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 01:00:01 2025 UTC |
Description: ------------ As always with bitmap filtering the items should be checked to satisfy all bitfields, not any of those Test script: --------------- <?php class Foo { public function one() {} static public function two() {} static protected function three() {} } $class = new ReflectionClass(Foo::class); $methods = $class->getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC); foreach ($methods as $method) { var_dump($method); } Expected result: ---------------- object(ReflectionMethod)#3 (2) { ["name"]=> string(3) "two" ["class"]=> string(3) "Foo" } Actual result: -------------- object(ReflectionMethod)#2 (2) { ["name"]=> string(3) "one" ["class"]=> string(3) "Foo" } object(ReflectionMethod)#3 (2) { ["name"]=> string(3) "two" ["class"]=> string(3) "Foo" } object(ReflectionMethod)#4 (2) { ["name"]=> string(5) "three" ["class"]=> string(3) "Foo" }