1. The first PHP program
< span="">< span="">< span="">< span="">
< span=""> < span=""> < span=""> " ?>< span="">
The 2.PHP supports 8 basic data rationality, including 4 scalar types: Boolean (Boolean), Integer (integer), float (floating point, also known as Double), string (string), 2 composite type: Array, Object, 2 Special types: Resource (Resource), null (NULL type)
3. Function Var_dump can be used to print information about a variable.
< span="">
< span=""> < span="">< span="">< span="">< span="">< span="">((bool) 0< span="">< span="">< span="">((bool) 0.0 < span=""> < span=""> (( bool) " < span=""> < span=""> < span=""> < span=""> ((BOOL) "0" < span=""> < span=""> < span=""> < span=""> < span="">< span="">< span="">< span="">< span=""> < span=""> ?>
4. About integral type.
In a 32-bit operating system, the valid range of integers is -2147483648~+2147483647. If this range is exceeded, it will be interpreted by the PHP engine as a floating point number (float).
Use octal plus 0, hex plus 0x (number 0 instead of letter O)
< span="">
< span=""> < span="">< span="">=63(< span=""> < span=""> < span=""> < span=""> < span=""> =077 < span=""> < span=""> < span=""> < span=""> < span="">(< span="">< span="">< span="">< span=""> =0x3f ( < span=""> < span=""> < span="">< span=""> < span=""> ?> < span=""> < span="">
5. String type
There are 3 ways to define strings, namely single quotation marks ('), double quotation marks ("), and delimiters (<<<). The difference between the preceding 2 is that if the string contains a variable name, the variable name in the double quotation marks is replaced by the actual value, and the variable name in the single quotation mark is output directly by ordinary characters.
< span="">
< span=""> < span="">= '< span="">< span="">mcdull ' =19 < span=""> < span=""> ' My name $name, $age ' < span=""> < span=""> < span=""> < span=""> < span=""> ' < span=""> ' My name < span=""> , the year- party< span=""> < span=""> < span=""> "< span=""> ?> < span="">
The following is used for the delimiter:
< span="">
< span=""> < span=""> < span=""> <<< < span=""> < span=""> < span=""> < span=""> ?> < span="">
6. Object Type
person (,< Span) {Span> ->name= ->age= < span> Span function< Span> ' My name '. ->name. '
I am this year '. ->age ' old ' < span> < span> = person ("Kimi", 5 ->?> <> <> <>
7. Type Conversion
Print_r () displays easy-to-understand information about a variable. If a string,integer , or floatis given, thevariable value itself is printed. If an array is given , the keys and elements will be displayed in a certain format
=3.141592653 =() "
" = ' Kimi ' = () span $temp _var< span> '
' ( = ' Cindy ' = () '
' (
http://www.bkjia.com/PHPjc/626630.html www.bkjia.com true http://www.bkjia.com/PHPjc/626630.html techarticle 1. The first PHP program? " ? 2.PHP supports 8 basic data rationality, including 4 scalar types: Boolean (Boolean), Integer (integer), float (floating point, also known as Double), s ...