This article mainly introduces the PHP constant, the constant syntax analysis, the interest friend's reference, hoped to be helpful to everybody.
One, constant
A constant is an identifier (first name) of a simple value. As the name implies, the
Constant
It is often found that the code contains some constant values that recur over and over again. You can also find that your code uses numbers that are hard to remember, and those numbers don't have a clear meaning.In these cases, the
PHP constants and variables. PHP constants and variables [constants] can be defined using the define () function. after PHP5.3.0, you can use the const keyword to define constants outside the class definition. Once a constant is set, PHP constants
Document directory
I. Syntax
Ii. predefined Constants
[PHP series tutorial] (4) describes the PHP variable: http://blog.csdn.net/rocket5725/archive/2010/01/08/5159704.aspx
This section describes constants in PHP, including their syntax and
This article mainly introduces the constants in PHP, interested in the reference of friends, I hope to be helpful to everyone.
A constant is an identifier (first name) of a simple value. The range of constants is global. Changshime is considered to
Defining constantsA constant is an identifier for a simple value. As the name implies, when a constant is defined during the execution of a script, it cannot be changed or de-defined. Changshime is considered to be case sensitive. By convention
One, constant
A constant is an identifier (name) of a simple value. As its name implies, the value cannot be changed during script execution (except for the so-called Magic constants, which are not constants). Changshime think case sensitive. By
The const modifier is a (class) static constant, whose value is a dynamic constant that is determined during compilation by the ReadOnly adornment.A, the difference between Const and readonly in C #There are two ways to define constants in C #, a
PHP Constants and variables
"Constant"
Constants can be defined with the Define () function, and after PHP 5.3.0, constants can be defined outside the class definition using the Const keyword. Once a constant is defined, it can no longer be changed
Technorati label: VBA, naming convention, constant, variable
Generally, naming Rules use a lowercase prefix or suffix to specify the type and scope of a variable. The variable itself should use meaningful names to describe what it is or what it is
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.