background image

  例如:

function HandleError($errorNumber) 

      

      

$error = OsErr(); 

      

$time_of_error = OsErr->getTimeOfError; 

      

$error_processor = OsErr->getErrorProcessor; 

      

全局变量的命名

 

   全局变量应该带前缀

g’。

  知道一个变量的作用域是非常重要的。 
  例如:

global $gLog; 

 

     

global &$grLog; 

函数的命名

  函数名字采用

C GNU 的惯例,所有的字母使用小写字母,使用'_'分割单词。

  这样可以更易于区分相关联的类名。 
  例如:

function some_bloody_function()