标签:stat extend 技术 mic UNC ext echo roc demo
<?php class Nba { const TITLE = ‘标题‘; protected static $basketball =‘篮球的‘; protected $rock =‘火箭队的‘; protected function color() { echo ‘红色‘; } protected static function user() { echo ‘莫雷是老大‘; } } class Yao extends Nba { public function demo() { $str = self::TITLE; $str .= self::$basketball; $str .= $this->color() ; $str .= $this->rock; $str .= self::user(); echo $str; } } $obj = new Yao(); $obj->demo();
标签:stat extend 技术 mic UNC ext echo roc demo
原文地址:https://www.cnblogs.com/xm666/p/11263326.html