Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2007
    Location
    London
    Posts
    225
    Thanks
    16
    Thanked 2 Times in 2 Posts

    Function v. method naming conventions - to camel or to underscore?

    Taken from:

    http://svn.php.net/viewvc/php/php-sr...NDARDS?view=co
    • Variable names should [...] [u]se underscores to separate between words
    • Function names [...] should be [...] underscore delimited
    • Method names [should] follow the [...] 'camel caps' [...] naming convention
    Discuss!

    (To what extent do you think these conventions matter when writing our code? (I'm not referring to writing core parts of PHP itself)
    In particular, why the difference between functions and methods?)
    Last edited by cfructose; 03-28-2010 at 01:25 PM. Reason: clarification

  • #2
    Senior Coder
    Join Date
    Jul 2009
    Location
    South Yorkshire, England
    Posts
    2,318
    Thanks
    6
    Thanked 304 Times in 303 Posts
    Personally, I detest the use of uppercase in code, full stop. Never use it and never will. Underscores between certain words, yes, but just depends on which looks best to the eye in each specific case. Sometimes I just string the words together if I think it looks nicer. My opinion is sod convention unless it has a useful purpose.

  • #3
    Regular Coder
    Join Date
    Feb 2007
    Location
    London
    Posts
    225
    Thanks
    16
    Thanked 2 Times in 2 Posts
    That pretty much echoes my feelings.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •