|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-02-14 09:08 UTC] krakjoe@php.net
-Status: Open
+Status: Not a bug
[2019-02-14 09:08 UTC] krakjoe@php.net
[2019-02-17 18:28 UTC] llmll at gmx dot de
[2019-02-17 18:30 UTC] llmll at gmx dot de
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Nov 07 05:00:01 2025 UTC |
Description: ------------ The function get_class_function() should always return the class name of the context in which it is called. Dynamic or Static context should make no difference. When wrapped in a parent:: call it returns the child's class name not the parent's one. Test script: --------------- class A { public static function Name() { return get_called_class(); } } class B extends A { public static function NameOfParent() { return parent::Name(); } } echo B::Name(); echo B::NameOfParent(); Expected result: ---------------- should report "B" as Name() and "A" as NameOfParent(). Actual result: -------------- return "B" twice, because parent doesn't change the context from B:: to A:: as it should.