1、变量命名
a.使用小驼峰,例如:$intMoney
b.必须加上变量类型:整形int 数组arr 字符串str 布尔bool 对象obj 资源res;
c.方法或函数名,全小写
d.变量赋值,等号两侧用空格,隔开
2、数组格式
$arrInfo = array();
$arrInfo['uid'] = $intUid;
$arrInfo['username'] = $strUsername;
$arrInfo['content'] = $strCodeType;
$arrInfo['issue'] = $intIssue;
$arrInfo['appnumbers'] = $intAppnumbers;
$arrInfo['ordernum'] = $intOrdernum;
$arrInfo['allmoney'] = $intMoney;
$arrInfo['topprize'] = 0;
$arrInfo['type'] = 109;
$arrInfo['dateline'] = time();
$arrInfo['opentime'] = 0;
$arrInfo['isnotpay'] = 1;
$arrInfo['btype'] = $intBType;
3、参数格式,第二个参数和前面的逗号空一格
public function getAllData($table, $arrWhere = array(), $intLimitStart=0, $intLimitEnd=10, $strOrderby="id") {
4、注释
/**
* 方法注释
*/
// 单行或代码块注释
5、代码缩进用四个空格