| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             [2004-01-16 05:08 UTC] helly@php.net
  [2004-05-21 05:23 UTC] kell_pt at users dot sf dot net
  [2004-05-21 10:17 UTC] abies@php.net
  [2004-09-30 18:22 UTC] kell_pt at users dot sf dot net
  [2004-09-30 20:23 UTC] helly@php.net
  | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 02:00:01 2025 UTC | 
Description: ------------ In a static function X a call to another static function in the same class uses the version of the function in the class where X is implemented, not the one for which X was called for. Reproduce code: --------------- class a { static function init() { echo 'a::init()'; } static function callInit() { self::init(); // do something important } } class b extends a { static function init() { echo 'b::init()'; } } b::callInit(); Expected result: ---------------- b::init() Actual result: -------------- a::init() Shouldn't inheritance work the same way as for normal methods? Thanks for comments, Ralph