Talking about the data type judgment function of variables in php, talking about the data type
In php, We can print the type and value of the variable through var_dump. At the same time, we can use some functions to determine the type of the variable. If you only want to get the data type of a variable, you can use the gettype () function. gettype ($ t) returns a $ t data type string, if $ t does not belong to eight basic variable types in php, "unknow type" is returned ". We can also use the is_type class function to directly determine whether it is a type function. If yes, true is returned, rather than false.
For example:
Is is_bool () Boolean?
Whether is_int () is an integer
Whether is_float () is float
Whether is_string () is string type
Whether is_array () is array type
Whether is_object () is of the Object Type
Whether is_resource () is a resource type
Is_null () is empty?
Whether is_scalar () is a scalar type is an integer floating-point Boolean type or a string type.
Whether is_numeric () is a numeric or numeric string of any type
Whether is_callable () is a valid function name
In the above discussion, the Data Type judgment function of variables in php is all the content that I have shared with you. I hope to give you a reference and support for the help house.