PHP学习笔记二十三【This】

<?php
  Class Person
  {
  
     function test1()
     {
      $this->test2();//类里面的方法互相调用要加$this
     }
    protected function test2()
     {
       echo "test2";
     }
  }

?>
原文地址:https://www.cnblogs.com/sumg/p/4052826.html