We are using
PHP variables 1. Define constants define ("CONSTANT", "Hello World");
Constants can only contain scalar data (boolean,integer,float and string).When calling a constant, simply use the name to get the value of the constant, not the "$"
Some basic functions commonly used by PHP (I) 1. PHP declaration and use constant ?? Define ('constant', '100'); similar to this, a CONSTANT is declared and cannot be modified once declared elsewhere. Generally, our constants are composed of
Thinkphp the use of custom constants and system constants
Constants we all know is to define the amount of good one constant, in PHP the definition of the rule is define ("Constant name", "Constant value");
That is, in all the pages can go to use
PHP variable Constant Definition method
A description of the definitions for some common static constants under PHP.
1. Defining constants
Define ("CONSTANT", "Hello World");
Constants can only contain scalar data (boolean,integer,float and string).
We can create a constant by using the following define statement.Define (' constant name ', constant value, case sensitive);Define (' PI ', 3.14);Do not write the third parameter the default name of this constant is case-sensitive.Define (' QI ', 8.1
I. Grammar1. Enum is all called enumeration, Chinese is commonly known as enumeration class, learn C + + and other languages of the people, should be to it knows. In the Java language Specification, however, it was introduced in the JDK version 5
Const
Used to define constant values that cannot be changed at run time. Once defined and cannot change its value, an error occurs if the value is changed in the program.
The code is as follows
Copy Code
CALSS
oracle| Data | Database Oracle Object Server contains six objects
1.OraClient
2.OreSession
3.OraConnection
4.OraDatabase
5.OraDynaset
6.OraSQLstmt
7.OraField
8.OraParameter
9.OraParameterArray
1.Oraclient objects
Oraclient object to record all
First, PHP beginning baseUse Var_dump to get the true data type;Example: Var_dump ($flag);echo ""; The cursor jumps to the next line;1, What is PHP:PHP, a nested abbreviated name, is an abbreviation for the English Super Text preprocessing language (
1. define the CONSTANT define ("CONSTANT", "Hello world ."); Constants can only contain scalar data (boolean, integer, float, and string ).When calling a CONSTANT, you only need to obtain the CONSTANT value with a simple name, instead of adding the "
PHP Basics
first, the initial knowledge of PHPPHP is an embedded language used in combination with HTML.
1. PHP tags
Default tag
Short Mark
, you need to turn on the Short_open_tag option in php.ini short mark and other tags are not recommended
2,
For PHP Beginners Some basic knowledge, can also be counted as some experience accumulated bar, there is a need for friends, can refer to the next.PHP BasicsFirst, phpphp is an embedded language used in combination with HTML. 1, PHP tag default mark
---------------------------------
Linux Kernel encoding Style
---------------------------------
This short document describes the encoding style used in Linux kernel programming. The encoding style is very personal, so I don't want to impose my
First, PHP system functions
Function
Function
Usage
Var_dump ()
Print variable structure information, including type and value. Array will recursively expand values
Var_dump ( $arg1...);
Summarize the Linux kernel development coding style, easy to write code later reference.Here are just a list of some rules, specific instructions can be consulted: kernel source (Documentation/codingstyle)01-IndentIndent tab, and tab width is 8
The pros and cons of Const and # define, thus deriving the meaning of const;Both const and # define have a similar function, which is to define a "constant";This is the way you want to replace a # define constant. This is a way to define macros.
PHP is a weak type of language
PHP has 8 types of Chinese4 scalar//Only one value can be stored1. Integral type: int integer2. Boolean: BOOL Boolean3. Floating-point type: float,double,real4. Character type: string2 compound types//A variable can
Cases
The code is as follows
Copy Code
$a = 12;function fn (){Global $a;//using outer $a variables, $a as local variables without using this method$a +=12;}echo ' $a = '. $a//output result?>Results of output: $a =24
PHP5.6 Const new Attribute definition class constants can use constant scalar expressions (Constant scalar expressions), for example:
Class MyTimer {Const SEC_PER_DAY = 60 * 60 * 24;}?>
The difference between define and const is that define can be
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.