PHP code Common "::" Operators, this is the scope of the qualified operator, which is used to pin class in the non-scoped level, the left is the scope, the right is the access scope of the members.
Scoped operator (also known as: Range resolution
http://www.cnblogs.com/wolf-lifeng/p/3156936.html2.3 Global Scope 2.3.1 OverviewThe global scope is the largest namespace scope, unlike the user-defined namespace scope, where the global scope does not need to be defined, and it naturally exists in
This article mainly introduces the use of PHP scope parsing operators (::), has a certain reference value, now share to everyone, the need for friends can refer to
Today to see the source of Joomla, just realize. It turns out that this operator can
See a few symbols about PHP today. One is @, this is added to the front of a variable, to suppress the PHP interpreter error, that is, even if the error is not displayed.
There is also a more important symbol for PHP's range resolution operator (::)
In object-oriented programming, some of its own operators, such as->, are used to access its own members in an object. The other one is the scope resolution operator: Two colons joined together (::). This symbol is used to access members in the
The scope resolution operator (also known as Paamayim Nekudotayim) or, more simply, a pair of colons, can be used to access static members, methods, and constants, and can also be used to access members and methods in the overridden class.
When you
Scope Resolution Operator (::)
Today to see the Joomla source, just realized. The original operator can also access the class Non-static method ah. It really amazes me that it's not good. The scope resolution operator has been assumed to have access
C + + Primer learning note _26_ operator overloading and conversion (1)--overload/non-overloaded operator, member function mode overload, Friend function mode overloadIntroduction:Use operator overloading wisely to make the use of class types as
PHP scope parsing operator (::). ScopeResolutionOperator (: :) I realized it only when I read the joomla source code today. In the past, this operator can also be used as a non-static method of the category class. It really surprised me. Always
The so-called overloading, is to give new meaning. function overloading allows a function name to have multiple functions and perform different operations under different circumstances. Operator overloading (Operator overloading) is also a reason
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.