Home >php教程 >php手册 >php高级编程实例分析 (内部笔记)

php高级编程实例分析 (内部笔记)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:52:59857browse

序,此笔记主要面向技术较高水平者;主要以OOP为主。

1.继承有讲究。不能乱加__construct

什么意思呢?在继承中如果要加入__construct一定要注意。此举可能覆盖其父亲之__construct。

如何办啊?

a.用其他方法来传变量;b.在子类的__construct加入parent::__construct(); parent::getone(); 而不要用 $this

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn