作者tails32100 (Tails)
看板PHP
标题[请益] Method直接用Static呼叫的问题
时间Thu Jul 18 09:14:08 2013
小弟这问题一年前就有了
原文:
https://disp.cc/b/tails#!546-3zvE
刚刚把程式码再拿出来试
发现出现错误
Strict standards: Non-static method A::testA() should not be called statically
, assuming $this from incompatible context in BALABALA
然後上网google一下错误,这好像是error_reporting的等级有包括E_STRICT
可是好像网路有些framework都有用到这个写法 (CakePHP、XOOPS)
小弟的问题是:
这个写法是建议不要用,还是可以用?
--
参考网站:
http://www.2cto.com/kf/201112/113053.html
http://blog.timc.idv.tw/posts/php5-3-e_strict/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.126.68.4