php coding guidelines

by admin | January 21, 2008 | In Web Development

I just prepared a coding guidelines for a next project which I have someone who is developing it with me.

Prefix
a - array
b - boolean
d - date
n - number
o - object
rs - recordset / db objects
s - string
xml - xml
m - variant / mixed
cls - class declaration

Variables must be declared with a prefix and succeded by a capital letter.

Example:

 
/* Language : php */
$nMyNumber=1234;
$sName='Carey Dayrit';
$dToday=now();
$oFile=new clsFileUpload();
 
class clsPaging{
...
}
 

also would use phpDocumentors syntax

Leave a Reply