[請益] Method直接用Static呼叫的問題

看板PHP作者 (Tails)時間12年前 (2013/07/18 09:14), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/2 (看更多)
小弟這問題一年前就有了 原文: 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
文章代碼(AID): #1Hvq5Yn0 (PHP)
文章代碼(AID): #1Hvq5Yn0 (PHP)