note 99339 added to language.oop5.late-static-bindings

From: Date: Wed, 11 Aug 2010 20:14:14 +0000
Subject: note 99339 added to language.oop5.late-static-bindings
Groups: php.notes 
Request: Send a blank email to php-notes+get-171582@lists.php.net to get a copy of this message
Interest behavior of self, shows that it is not absolutely correct, that self:: are resolved using the class in which the function belongs <? class A { static function f() { print get_called_class(); } static function g() { self::f(); } } class B extends A { /* empty */ } B::f(); B::g(); ?> The output will be «BB», this shows that A::f called by self:: in A still refers to B. ---- Server IP: 78.41.111.10 Probable Submitter: 212.1.250.191 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.late-static-bindings.php Edit -- https://master.php.net/note/edit/99339 Del: integrated -- https://master.php.net/note/delete/99339/integrated Del: useless -- https://master.php.net/note/delete/99339/useless Del: bad code -- https://master.php.net/note/delete/99339/bad+code Del: spam -- https://master.php.net/note/delete/99339/spam Del: non-english -- https://master.php.net/note/delete/99339/non-english Del: in docs -- https://master.php.net/note/delete/99339/in+docs Del: other reasons-- https://master.php.net/note/delete/99339 Reject -- https://master.php.net/note/reject/99339 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#171582) next »