@author andrej arn
@author sam blume
@version 4.6 updated 2005-11-24
we’d like to have a clean and professional, bug-free code.
Most people have different coding styles. And most think that
“the other style” is ugly. We don’t want to force you changing
your style. Here is how we do it and like it:
o) We use capital letters for constants. e.g. define(‘CONSTANT’, 1).
We also use the capital form of TRUE, FALSE and NULL.
o) If a function is described to return bool, expect to get a real bool
(TRUE/FALSE) and not an int (0/1). So please code your functions and
methods that way.
o) Don’t trust the return values from php methods. If they are stated
to return bool, they often return an int (0/1). So don’t directly
return that from your functions, convert to (bool) if necessary.
o) Never ever use echo, print and die and the like inside your methods.
o) this applies also for white spaces. if you start your file with anything
(an empty line) before the considered as output. This makes header() calls impossible (cookie,
session). The same applies for white spaces after the ?> tag. take care!
Even a newline is too much. This is a typical php newbie mistake.
o) Everything should be as os independant as possible. Including windows.
o) Make your code work with PHP version 4.3.0+ and 5.0.5+.
Don’t support php3.
o) Make the php exam. Repeat it from time to time.