tp5.1中的命名规范

类里边用驼峰(类名首字母大写,属性和方法首字母小写)

  类名:User,UserType

  类中的属性和方法:getUserName(),tableName,instance

参数、数据表和字段 用小写字母+下划线

  参数:user_route_on

  数据表和字段:think_user,user_name

常量、环境变量 用大写字母+下划线 

  常量:APP_PATH

  数据表和字段:APP_DEBUG

原文地址:https://www.cnblogs.com/qq254980080/p/10801863.html