摘要:
class test_parent{ public $v1; function __construct() { $this->v1=' parent field v1 '; } function func() { echo ' parent_func called '; }}class test_child extends test_parent{ //子类无构造函数则执行父类构造函数,有则执行子类构造函数(不执行父类构造函数,若需执行要写parent::__construct()) public function get_parent_field() { 阅读全文
posted @ 2012-08-07 16:42
冷战疑云
阅读(176)
评论(0)
推荐(0)
浙公网安备 33010602011771号