Lately I've noticed more and more the use of a double underscore before a class's variable name, e.g:
Is there a reason for this, i.e. naming conventions ?PHP Code:var $__variableName = null;
| SitePoint Sponsor |
Lately I've noticed more and more the use of a double underscore before a class's variable name, e.g:
Is there a reason for this, i.e. naming conventions ?PHP Code:var $__variableName = null;
One actually should not use double underscores as PHP reserves alot of those for magic functions or variables.
However a single underscore usually dictates that the item is private.
http://www.php.net/manual/en/language.oop5.magic.php
I would expand that to everything including variables.Caution
PHP reserves all function names starting with __ as magical. It is recommended that you do not use function names with __ in PHP unless you want some documented magic functionality


My answer is obfuscation.
http://en.wikipedia.org/wiki/Obfuscated_code
Bookmarks