|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-11-24 09:03 UTC] laruence@php.net
-Assigned To:
+Assigned To: laruence
[2011-11-24 09:15 UTC] laruence@php.net
[2011-11-24 09:18 UTC] laruence@php.net
-Status: Assigned
+Status: Closed
[2011-11-24 09:18 UTC] laruence@php.net
[2012-04-18 09:47 UTC] laruence@php.net
[2012-07-24 23:38 UTC] rasmus@php.net
[2013-04-03 20:26 UTC] david at orlandophp dot org
[2013-11-17 09:35 UTC] laruence@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
Description: ------------ When calling a method that exists only in the parent class with Reflection, the incorrect class is used. This bug is highly related to #53742, but has a different test case. The root cause may be exactly the same. Test script: --------------- abstract class A { const WHAT = 'wrong'; public static function call() { echo static::WHAT; } } class B extends A { const WHAT = 'correct'; } B::call(); $class = new ReflectionClass('B'); $class->getMethod('call')->invoke(null); Expected result: ---------------- "correct" Actual result: -------------- "wrong"