Re: Naming conventions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jason Davidson wrote:
Oh please dont start a thread on which is better !!!!.. but i beleive it was decided that camel case is the standard now.
Jason


"Jensen, Kimberlee" <KJensen@xxxxxxxxxxxx> wrote:

What do you use for your naming conventions for
variables
functions
classes

I'm trying to tell my students what the standard is currently. Are people using
camel case or underscores or both?

The standard in built-in PHP functions is underscores for procedural code (simplexml_load_string) and studlyCaps/CamelCaps for object-oriented code. classes are named using CamelCaps (SimpleXMLElement) and methods are named using studlyCaps (SimpleXMLElement->attributes(), simpleXMLElement->asXML()). It would be best to adhere to this standard, regardless of personal convictions, as any class that extends a built-in class will otherwise end up with a medley of method-naming conventions.


Regards,
Greg

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux