完全根据个人喜好习惯!不过最好遵守一定的编程规范
应该这样写:class DbSql
{
     function num_rows($result)  // 函数名也可用: numRows
     {
        ...
     }
}