What do you call with these string :: and __ in PHP and what other strings are similar to them?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
:: = Scope resolution operator: http://www.php.net/manual/en/language.oop5.paamayim-nekudotayim.php
The __-prefix is a convention surrounded by built-in magic: http://www.php.net/manual/en/userlandnaming.rules.php, never start a function or variable with this if you can avoid it.
The first is a token, the second a convention.
If you really want to know most tokens, see: http://www.php.net/manual/en/tokens.php
If you want to know more about naming conventions, see: http://www.php.net/manual/en/userlandnaming.php
When starting out with PHP it would hurt to read Zend coding conventions, although it’s not a must and not the only way by a long shot: http://framework.zend.com/manual/en/coding-standard.html