如何调用在child中重载的parent's方法


How to call parent's method which is overloaded in child

我有PHP代码

<?
class AParent {
  function to_s() {
    return $this->id;
  }
}
class AChild {
  public $id;
  public $name;
  function to_s() {
    if(!empty($this->name)) {
      $ret = $this->name;
    } else {
      $ret = /** call parent's method to_s() */
    }
    return $ret;
  }
}

如何调用在child中重载的parents方法?:)这是可能的静态方法,但如何做到与非静态方法?

$a = new AChild();
$a->id = 1;
$a->name = 'Something';
echo $a; // Should echo "Something"
$b = new AChild();
$b->id = 2;
echo $b; // Should echo "2"

使用$ret = parent::to_s()就足够了