PHP static function being called in dynamic environment
问题 Since when PHP allows to call static function like a dynamic function? I am using php 5.3.2 class weird{ public static function iamstatic($calledFrom){ echo "I am a static function called with a $calledFrom operator\n"; } public function test(){ self::iamstatic("static"); $this->iamstatic("dynamic"); } } $c = new weird(); $c->test(); weird::iamstatic("Static outside class"); $c->iamstatic("Dynamic outside class"); This outputs : I am a static function called with a static operator I am a