/* "type operation function" * /
get / set type
GetType ($var)// get the data type of the variable
Settype ($var, $type)// set the data type of the variable
Type judgment
Is_int
Is_float
Is_null
Is_string
Is_resource
Is_array
Is_bool
Is_object
Is_numeric Detect if a variable is a numeric or numeric string
convert to the specified data type
Boolval
Floatval
Intval
Strval
Cast Type
(int)
(float)
(string)
(BOOL)
(array)
(object)
(unset)// convert to NULL
(binary) Conversion and B- prefix conversion // conversion to Binary
Var_dump information about the print variable.
Displays 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.
Var_export ($var [, BOOL $return])// output or return a string representation of a variable
$return: true toreturn the result of the variable after execution
Print_r to print easy-to-understand information about variables
Empty checks if a variable is null
Isset Detecting whether a variable exists
/* "Process Control" * /
alternative syntax for an IF statement
if ( condition judgment ):
statement block ;
ElseIf ( conditional judgment ):
statement block ;
else:
statement block ;
endif
alternative syntax for Process Control
often used in embedding HTML
Replace { with:, change } to endif; wait
endif
Endwhile
ENDfor
Endforeach
Endswitch
php-type function