PHP development specifications
- Directories and (not class files) are both lowercase + underscore, and start with a lowercase letter;
For example: /application/uctenter/controller
- The first letter of the class name and the class file should be capitalized, and the names should be consistent;
For example: /application/uctenter/controller/User.php
class User{
//Attribute
public userName; //The first letter of the camel case name is lowercase
//Private attribute
private _userAge; //The first letter of the camel case name is lowercase
//Method
public function getUser(){//The camel case name The first letter is lowercase
}
//Magic method
function __autoload(){//Start with a double underscore "__"
}
}
- Function naming | Configuration naming | Data table and field naming, all lowercase + underline;
Such as: get_user()|url_route_on|wll_user
- Constant names are capital letters and underscores, for example: APP_DEBUG and APP_MODE;
5. Css adopts bootstrap naming convention , custom style is : current page+ position+ function [such as: index_left_news]

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

