本文共 1692 字,大约阅读时间需要 5 分钟。
php的继承功能还很不完善,并且很容易出错。运行下面的代码,看看结果是否是你所要的。
结果:
constructor of CC has been called!
constructor of CD has been called!CC::Print1()CC::Print2()CD::Echo1()CB::Echo3m_var1 = 1m_var2 = m_var3 = 3m_var4 = 4m_var = 10static m_var3 = 11转载地址:http://abpcb.baihongyu.com/