本文介紹了PHP中的兩個冒號是什么意思?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
當我們遇到這種情況時,我不知道它在做什么:
I don't know what it's doing when we have this situation:
Foo::Bar
它看起來像一條路徑.
推薦答案
這(通常)用于訪問類中的靜態方法或屬性.它被稱為范圍解析運算符,或 Paamayim Nekudotayim(這會導致一些令人驚訝的令人困惑的錯誤消息!).參見 http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php.
That's (generally) for accessing a static method or property in a class. It's called the scope resolution operator, or Paamayim Nekudotayim (which leads to some amazingly confusing error messages!). See http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php.
這篇關于PHP中的兩個冒號是什么意思?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!