PHP: self:: vs parent:: with extends

后端 未结 2 577
予麋鹿
予麋鹿 2020-12-24 08:44

I\'m wondering what is the difference between using self:: and parent:: when a static child class is extending static parent class e.g.

class Parent {

    p         


        
2条回答
  •  情深已故
    2020-12-24 09:05

    self is used to call static function and manipulate static variables, which are class specific not object specific.

提交回复
热议问题