This article introduces, PHP programming in the naming standard, including the basic concept, camel-style nomenclature, hump method, Pascal method, the need for friends, may wish to refer to the study.Camel-like nomenclature (also called Hump
What are the rules for naming variables in PHP, and I'm sure you all know that simple but fine-grained estimates don't know, let's take a look at the declaration of PHP variables and the introduction of variable naming rules.
Which of the following
to understand and master a programming language, I think it is important to master its naming rules. No rules. Inadequate surrounding area, programming is the same, not only you can understand, others should also be able to understand your code, it
1. ClassThe class name is capitalized in the first letter of each word, such as the class name Studentcourse.2. ConstantsThe constant name is all uppercase letters, the words are separated by underscores, and the usual names are null, TRUE, FALSE,
As a general rule, the names of classes, functions, and variables should be able to make it easy for code readers to know what the code does, and avoid using the ambiguous nomenclature.1. Class naming
Use uppercase letters for the
PHP variable naming rules
1. The variable begins with the dollar sign $. such as $name, $age.
2, dollar sign $ The first character that follows cannot be a number, only an underscore _ or a letter. Variables such as $1_1 are wrong.
3, in addition
Specification | Development Guide
Fleaphp's naming rules and directory structure look more complicated at first, but after you get used to it, you'll see a lot of benefits from this naming convention. The same approach is therefore used in the Zend
{Code ...} the source code of the facebook homepage I pulled out a few days ago is almost underlined, and WordPress uses underline. I also like to use underline when writing PHP, however, sometimes the hump is "professional ". While Javascript is
A framework written using PHP must have its own specifications, thinkphp and vice versa. Here are The naming conventions that should be followed as much as possible using thinkphp: class 2 files are suffixed with . class.php (This is the thinkphp
From C + + to PHP has been a long time, has been a bit of code cleanliness, for the file name, interface name, class name, method name, etc. use strict hump naming method,But sometimes you hesitate to use the initial capitalization to differentiate
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.