August 2000
Intermediate to advanced
800 pages
13h 15m
English
As previously stated, functions should have a comment block explaining what they do and their input/output. The function block should align starting at one tab from the left margin unless the function is part of a class definition. Opening and closing braces should also be one tab from the left margin. The body of the function should be indented two tabs.
<php
/*
** doAdd
** Adds two integers
** Input: $a, $b
** Output: sum of $a and $b
*/
function doAdd($a, $b)
{
return(a+b);
}
?>
Read now
Unlock full access