Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language?
| From: | Peter Lind | Date: | Tue, 27 Jul 2010 11:11:14 +0000 |
| Subject: | Re: Re[2]: [PHP] Do you have some standard for defined the variable in program language? | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-307160@lists.php.net to get a copy of this message | ||
On 27 July 2010 13:04, viraj <kalinga@gmail.com> wrote:
> so, this is another reason to avoid 'underscore' in variable names.
> code looks prettier and clean.
That's all in the eye of the viewer: underscores are much prettier to
me in variables. That's all just a roundabout way of saying "it's
prettier" has no meaning on an objective level.
> classes - MyBestClass
> functions - TheGreatestFunctionInTheWorld
That confuses classes and functions - I prefer a naming convention
where classes and functions are named using different styles.
Personally I go for mixed-case for classes and camelcase for
functions, e.g. MyClass and myFunction(). Still, that's really just
personal taste and whatever makes you happy is the thing to go with.
Regards
Peter
--
<hype>
WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
BeWelcome/Couchsurfing: Fake51
Twitter: http://twitter.com/kafe15
</hype>