PHP Code Standards: Difference between revisions
Jump to navigation
Jump to search
| Line 15: | Line 15: | ||
If the function name is made up of multiple words, use snake case, ex. <pre>update_by_id</pre> | If the function name is made up of multiple words, use snake case, ex. <pre>update_by_id</pre> | ||
=== | === Classes === | ||
Class names should all be capitalized, ex. <pre>Vertical</pre> | Class names should all be capitalized, ex. <pre>Vertical</pre> | ||
If the class name is made up of multiple words, use snake case, but preserving the first word capitalization, ex. <pre>Vertical_groups</pre> | If the class name is made up of multiple words, use snake case, but preserving the first word capitalization, ex. <pre>Vertical_groups</pre> | ||
Revision as of 03:12, 26 October 2022
Popular Marketing Code Standards
1. Variable Naming Conventions
Local Variables
Local variable names should all be lower case, ex.
If the local variable name is made up of multiple words, use snake case, ex.
email_address
Functions
Function names should all be lowercase, ex.
update
If the function name is made up of multiple words, use snake case, ex.
update_by_id
Classes
Class names should all be capitalized, ex.
Vertical
If the class name is made up of multiple words, use snake case, but preserving the first word capitalization, ex.
Vertical_groups