Coding Standards
From Documentation
68 Classifieds uses a slightly modified version of the Pear standard.
Below are the only differences:
- Brace Style
- Brace styles, when used correctly, makes for easier reading. An example:
if ((condition1) || (condition2))
{
action1;
}
elseif ((condition3) && (condition4))
{
action2;
}
else
{
defaultaction;
} // end blah
Control statements should have one space between the control keyword and opening parenthesis, to distinguish them from function calls.
You are strongly encouraged to always use curly braces even in situations where they are technically optional. Having them increases readability and decreases the likelihood of logic errors being introduced when new lines are added.
- No Shorthand PHP
- Never use shorthand PHP start tags (<? ... ?>). Always use full PHP tags (<?php ... ?>).