PHP supports raw data types in 8: Boolean | Integer | float | string | Array | Object | Resource | Null
1.4 Types of scalar data
1.1 Boolean Boolean type
1.2 Integer integer type
1.3 Float | Double floating point type
1.4 String Strings
2.2 Types of data compliance
2.1 Array Arrays
2.2 Object Objects
3.2 Special types
3.1 Resource Resources
3.2 NULL No type
Pseudo type: Mixed mixed type | Number Numeric Type | Callback Callback Type
Pseudo variable: $
The type of the variable is determined by the context in which PHP is used based on the variable.
void Var_dump (Mixed $expression [, $ ...]);
If you want to see the value and type of an expression, use the var_dump () function--to print information about the variable, to display the structure information about one or more expressions, including the type and value of the expression. The array recursively expands the value and displays its structure by indentation.
String GetType (mixed $var);
If you just want a readable type of expression for debugging, use the GetType () function--to get the type of the variable.
BOOL Is_array (mixed $var);
If you want to see a type with the is_* function: Is_array () | Is_bool () | Is_float () | Is_integer () | Is_null () | Is_number () | Is_object () | Is_resource () | Is_scalar () | Is_string ()-- detects the variable type .
BOOL Settype (mixed $var, string $type);
If you want to cast a variable to a type, you can use the settype () function--to set the type of the variable .
PHP Manual-language Reference-type