Menu
Folks,
I am reading on “Coding Standards”. This thread will be based on that.
<i>
</i>if()
<i>
</i>if ()
<i>
</i>function new ()
<i>
</i>function new ($param1,$param2)
{
code
}
<i>
</i>function new ($param1, $param2)
{
code
}
<i>
</i>function function_4($new=NULL)
<i>
</i>function function_4($new = NULL)
<i>
</i>function function_4($new = 'NULL')
**Use all lower case letters
Use '_' as the word separator.
Global variables should be prepended with a 'g'.
_Global constants should be all caps with '_' separators.
Static variables may be prepended with 's'.**_
Make Functions Reentrant − Functions should not keep static variables that prevent a function from being reentrant.
Alignment of Declaration Blocks − Block of declarations should be aligned.
One Statement Per Line − There should be only one statement per line unless the statements are very closely related.
Short Methods or Functions − Methods should limit themselves to a single page of code.
{
>>has no impact on _**n**_ow the script works<<
$strWord = "bar";
$intNumber = 1;
$blnOption = true;
$arrNumbers = array(1, 2, 3);
thisIsAGlobalVar
`0.1.9 — BETA 4.25