+ 2

How do you make your variables?

1. oneword 2. under_score 3. lowerCaseFirstWord 4. UpperCaseWords 5. UPPERONEWORD 6. UPPER_UNDER_SCORE

9th May 2017, 8:47 PM
Nitoxym
Nitoxym - avatar
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.
10th May 2017, 12:36 AM
Calviղ
Calviղ - avatar
+ 15
1 or 3: camel 🐪 case
9th May 2017, 8:59 PM
Shamima Yasmin
Shamima Yasmin - avatar
+ 8
generally: camelCase for methods/variables CapsCase for classes ALL_CAPS for constants
9th May 2017, 9:09 PM
Rrestoring faith
Rrestoring faith - avatar
+ 3
In my case, I prefer 2
9th May 2017, 8:47 PM
Nitoxym
Nitoxym - avatar
+ 3
1 and 3 for variables 5 and 6 for constants
9th May 2017, 9:01 PM
Welliton Malta
Welliton Malta - avatar
+ 2
for me it's 3 : clear and compact 😄 forMeItsThreeClearAndCompact
9th May 2017, 8:52 PM
Hbeo
Hbeo - avatar