Coding Standards
Variable Naming Standards
There is no definitive naming convention in PHP, and they differ by framework:
- Zend does not permit underscores
- Symfony also encourages camelCase
- Wordpress encourages underscores and does not like camelCase
- CodeIgniter also promotes underscores
So: Use whatever your framework uses or create your own naming convention.
At least for function names and class methods, there is a one thing to consider, but some frameworks discard it: PHP is case insensitive in that case, so aTonalFunction() atonalFunction() &?php &?= StudlyCaps UPPER_CASE camelCase namespace use abstract final static
must be declared after the visibility.
- Control structure keywords must have one space after them; method and function calls must not.
- Opening braces for control structures must go on the same line, and closing braces must go on the next line after the body.
- Opening parentheses for control structures must not have a space after them, and closing parentheses for control structures must not have a space before.
BC Government API Guidelines
Published by the Technical Assets Working Group under the BC Data Council
Purpose : The purpose of these guidelines is to promote consistency and provide guidance around the use of Application Programming Interfaces (APIs) across the BC government, and to enable exchange and integration of data between systems, agencies, businesses and citizens.
https://wp.odu.edu/what-you-need-to-know-about-copy-right/