1.gettype (): Gets the variable type 2.is_array (): Determines whether the variable type is an array type 3.is_double (): Determines whether the variable type is a double floating-point type 4.is_float (): Determines whether the variable type is floating-point type 5.is_int () : Determines whether the variable type is an integer type 6.is_integer (): Determines whether the variable type is a long integer type 7.is_long (): Determines whether the variable type is a long integer type 8.is_object (): Determines whether the variable type is an object type 9.is_real (): Determines whether the variable type is a real type 10.is_string (): Determines whether the variable type is a string type. 11.is_binary (): Finds Whether a variable is a native binary String12.is_bool ( ): Detects if the variable is a Boolean 13.is_dir (): Determines whether the given file name is a directory 14.is_file (): Determines whether the given file name is a normal file 15.is_null (): Detects if the variable isNULL16:is_numeric (): Detects whether a variable is a numeric or numeric string 17.is_resource (): Detects if a variable is a resource type 18.is_unicode (): Finds Whether a variable is a Unicode String. ----------------------------------------------------------------------now let's take a look at the specific ways to use
GetType ()
GetType returns the following values based on the parameter type
"Boolean" (from PHP 4)
"Integer"
"Double" (If float returns "Double" instead of "float")
"String"
"Array"
"Object"
"Resource" (from PHP 4)
"NULL" (from PHP 4)
"Unknown type"
For example:
GetType (' 1 '); Returns a string
and GetType (1); Returns an integer
Is_array ()
Is_array () is relatively simple to use
False if the argument is an array that returns true otherwise
The usage and return values of several other functions are similar to Is_array ()
It is important to note that is_numeric () is used to determine whether a variable is a number or a string.
Returns true if the argument of Is_numeric () is a numeric or numeric string, or False
PHP Common type judgment function