<?php class A { private $name; function __construct($param){ $this->name = 'liming'.'<br>'; } function getName() { echo $this->name; } // 调用子类中的方法getAge2 function getAge() { $this->getAge2(); } function getAge3() { return '23'; } } class B extends A { function getAge2(){ echo $this->getAge3(); } } $a = new B('a'); $a->getName(); $a->getAge(); $b = new A('b'); $b->getAge();
You have javascript disabled. You will not be able to edit any code.
Value for `_results` contains invalid data `array`