+ 2
How do you make your variables?
1. oneword 2. under_score 3. lowerCaseFirstWord 4. UpperCaseWords 5. UPPERONEWORD 6. UPPER_UNDER_SCORE
6 ответов
+ 3
The standard one to use for Php variable naming should be 2 and 3, underscore and camelCase.
For Php framework/libs that exist for quite so time like Wordpress, its coding uses underscore. But more and more new Php framework use camelCase to code now.
4 is for class name use.
5 and 6 for constant name use.
+ 15
1 or 3: camel 🐪 case
+ 8
generally:
camelCase for methods/variables
CapsCase for classes
ALL_CAPS for constants
+ 3
In my case, I prefer 2
+ 3
1 and 3 for variables
5 and 6 for constants
+ 2
for me it's 3 : clear and compact 😄
forMeItsThreeClearAndCompact



