Data type
Integral type
Floating point Type
Boolean type
String
Array
Object
Conversion between types
(int) $val; Convert to integral type
(float) $val; Convert to floating point type
(string) $val; Convert to String
(bool) $val; Convert to Boolean type
(array) $val; Converts an array that contains only one element of $val. [$val]
(object) $val; Convert to an object, the scalar property of the object points to $val. {scalar: $val}
Get type
Use the function string GetType ($val); Get the variable type
The function returns a value of array, Boolean, double, Integer, Object, Resource, String, NULL, and unknown type.
Alternatively, you can use the following function to determine the variable type
Is_array (Val); Is_bool (Val); Is_float (Val); Is_integer (Val); Is_null (Val); Is_numeric (Val); Is_object (Val); Is_resource (Val); Is_scalar (Val); and Is_string (Val);
PHP Super Global variables
$_server contains data about the browser and the server
$_get contains the GET data from the URL request
$_post contains the POST data from the URL request
$_cookie contains COOKIE data for the browser
$_session for accessing SESSION data
$_files contains the data uploaded by the file
$GLOBALS contains all the global variables
The above describes the PHP data type and conversion, including the data type, PHP content, I hope the PHP tutorial interested in a friend helpful.