|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2011-05-12 20:06 UTC] phdaemon at gmail dot com
[2011-08-04 19:13 UTC] josh at joshbutts dot com
[2011-12-21 07:02 UTC] will dot fitch at gmail dot com
[2011-12-21 07:13 UTC] laruence@php.net
-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: laruence
[2011-12-21 07:13 UTC] laruence@php.net
[2013-04-03 20:28 UTC] david at orlandophp dot org
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Dec 03 21:00:01 2025 UTC |
Description: ------------ When a static method is called through reflection, late static binding does not work. Probably because the getMethod() returns the method associated to the parent class. Test script: --------------- class A{ public static function call(){ static::callLate(); } public static abstract function callLate(); } class B{ public static function callLate(){ echo 'Late static binding'; } } B::call(); $class = new ReflectionClass('B'); $class->getMethod('call')->invoke(null); Expected result: ---------------- Late static binding Late static binding Actual result: -------------- Late static binding Cannot call abstract method B::callLate()