How to determine the data type in php, which common functions are used by php to determine the data type, and other php variable types such as string, number, and Boolean in php, for your reference. Php functions for Determining data types I. How does php determine the data type?You can use the following function: isset (): // whether the variable has declared empty (): // whether the variable is null defined (): // whether the constant has defined define () array_key_exists (mixed key, array search): // check whether the given key name or index exists in the array Is_numeric (mixed var): // check whether the variable is a numeric or numeric string is_bool (): // check whether the variable is a Boolean is_float (): // check whether the variables are floating-point and is_double, is_real (). use is_int (): // check whether the variables are integer is_integer (). use is_string (): // check whether the variable is a string is_object (): // check whether the variable is an object is_array (): // check whether the variable is an array is_null (): // check whether the variable is NULL or not. II. php Data type judgment functions Php Data type determination, pay attention to is_numeric () check whether the variable is a number or a number string with an is_integer (). Common data type judgment functions: is_bool (), is_float (), is_int (), is_string (), is_object (), is_array (), and is_integer (). |