PHP best practices for naming conventions

Posted by alex on Stack Overflow See other posts from Stack Overflow or by alex
Published on 2008-12-02T02:12:39Z Indexed on 2010/03/26 22:23 UTC
Read the original article Hit count: 437

I recently started these naming conventions..

all functions & variables = camelCase

constants with define() = ALL_CAPS_AND_UNDERSCORES

Now I see a lot of other people mix up camelCase and underscores and they seem to have some sort of convention to it... What do you use and what is best? I've heard that public and private functions should have underscores before some.. I assume private have 2 underscores as in __construct() ?

Thank you!

© Stack Overflow or respective owner

Related posts about php

Related posts about naming-conventions