|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2014-02-19 02:53 UTC] coolwust at gmail dot com
[2014-02-19 07:36 UTC] temenb at gmail dot com
[2014-06-27 12:36 UTC] arjen at react dot com
[2014-06-27 12:42 UTC] pajoye@php.net
[2014-07-09 14:12 UTC] arjen at react dot com
[2016-05-05 09:58 UTC] nikic@php.net
-Status: Open
+Status: Not a bug
[2016-05-05 09:58 UTC] nikic@php.net
[2016-05-05 10:00 UTC] nikic@php.net
-Summary: strange behavior
+Summary: LSB scope on scoped call from incompatible context
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 06 08:00:02 2026 UTC |
Description: ------------ static::foo() in the method A::a1() in some cases calls method B::foo() It is not late static bindings, B doesn't extend A Test script: --------------- <?php class A { public function a1() { static::foo(); } static public function a2() { static::foo(); } static public function foo() { echo 'A'; } } class B { public function b1() { A::a1(); A::a2(); } static public function b2() { A::a1(); A::a2(); } static public function foo() { echo 'B'; } } B::b1();//A B::b2();//A $b = new B; $b->b1();//B $b->b2();//A