In PHP, how to determine the type of data, PHP to determine the common functions of the data type, in PHP to determine the type of string, numeric type, Boolean type, and other types of PHP variables, for your study reference. PHP function for judging data types first, how does PHP determine the data type? You can use the following function: Isset ()://variable declared empty ()://variable is null defined ():///The constant has been 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)://detects if the variable is a numeric or numeric string Is_bool ()://The detection variable is Boolean is_float ()://detection variable is floating point type and is_double,is_real () are the same usage I S_int ()://Check whether the variable is an integer Is_integer () the same usage is_string ()://Detect whether the variable is a string Is_object ()://Detect whether the variable is an object Is_array ()://Detection variable is an array is_ Null ()://Check whether the variable is a null value if it is case-sensitive What are the PHP data type judging functions? PHP data type, note that is_numeric () detects whether a variable is a numeric or numeric string that differs from Is_integer (). Common data type Judgment functions: Is_bool (), Is_float (), Is_int (), is_string (), Is_object (), Is_array (), and Is_integer (). |