Coding standards
| From: | Erik Hjortsberg | Date: | Sun, 15 Jul 2001 00:01:03 +0000 |
| Subject: | Coding standards | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-778@lists.php.net to get a copy of this message | ||
Is there a reason for us not to make disinction between static and entity methods and between private and public methods?
I find it very hard to look through the code to figure out which methods I can call when subclassing or using objects or using classes.
I've always used capitals on static methods and underscore on private.
Thus:
function foo() -- public entity method
function _foo() -- private entity method
function Foo() -- public static method
function _Foo() -- private static method
Even though php of now isn't case-sensitive when it comes to functions (which it will be in the future (4.1?)) it would make much more sense.
/erik hjortsberg