1. Boolean type (BOOL):
Boolean type, which is true or false.
The following conditions are determined to be false:
2. Integral type (int):
Range 2147483647~-2147483648
If a given range exceeds this range, it will be considered floating-point.
3. Float type (float):
Contains the number of fractional parts. Range 1.7e-38~1.7e+38, accurate to 15 digits after the decimal point.
4. Strings (String):
Single quotes:
The method that specifies a simple string is enclosed in single quotation marks. The single quotation mark also expresses a single quotation mark escaped with a backslash "\".
PHP does not parse the variables in single quotes, it is output directly.
Double quotes:
Variables can be parsed.
Delimiter: "<<<".
$a =<<<eot Here are character characters EOT; It is worth noting that this method end must be shelf written.
5. Arrays
Declaration method:
$arr = Array (1,2,3,4,5);//$arr = Array (k1 = 1, k2 = 2, K3 = 3);
6. Object:
7. Resources: Link or open an external resource.
8.NULL
Indicates that a variable has no value. Does not represent a space, does not represent 0, and does not represent an empty string.
$a =null; $b = "Me"; unset ($b); Var_dump ($a);//Direct assignment is null, Output nullvar_dump ($b);//output NULL, variable is destroyed var_dump ($c);//Output NULL, No statement at all.
The above three cases are judged null:
9. Pseudo-Class:
PHP Basics-Data types