Static and Non-Static Calling in PHP

前端 未结 3 1026
不思量自难忘°
不思量自难忘° 2021-02-07 14:19

ok I have this code, that I\'m studying

 class scope{

    function printme(){
        return \"hello\";
    }

    public static function printme(){
        ret         


        
3条回答
  •  粉色の甜心
    2021-02-07 14:22

    Here is the rule:

    A static method can be used in both static method and non-static method.

    A non-static method can only be used in a non-static method.

提交回复
热议问题