...
All PHP files should be encoded using UTF-8, with no byte-order-mark (BOM).
Programming
...
Style
Variables
Use logical and descriptive names for your variables. Variables used in iterating loops, such as $i, $j, $k, etc., are exceptions to this rule. Variables should contain only lower-case letters, underscores, and numbers, and should start with a letter. Values true, false, and null should always be lower-case.
...
Tip | |||||
---|---|---|---|---|---|
| |||||
|
Classes
Class names should be CamelCased. Only a single class should appear in a file. Class file names should be lowercase and use underscores to separate words.
Warning | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
Tip | |||||||||
---|---|---|---|---|---|---|---|---|---|
| |||||||||
|
Methods
Comments
There are three types of comments that may be used in PHP. They are block comments (/* */), inline comments (//), and shell comments (#).
...