PHP Data types include string, integer, floating point number, Boolean, array, object, and NULL. Use the var_dump function to determine the variable type. The var_dump function is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, it is the value of the variable and returns the data type. PHP Data types include string, integer, floating point number, Boolean, array, object, and NULL.
Use the var_dump function to determine the variable type.
The var_dump function is used to determine the type and length of a variable and output the value of the variable. if the variable has a value, it is the value of the variable and returns the data type.
Java code
$ Val1 = 1;
$ Val2 = 3.14;
$ Val3 = 'Who Asked You. ';
$ Val4 = array ('AAA', 'BBB ');
$ Val5 = true;
$ Val6 = function (){};
$ Val7 = null;
Var_dump ($ val1); // integer
Echo'
';
Var_dump ($ val2); // floating point number
Echo'
';
Var_dump ($ val3); // string
Echo'
';
Var_dump ($ val4); // Array
Echo'
';
Var_dump ($ val5); // boolean
Echo'
';
Var_dump ($ val6); // object
Echo'
';
Var_dump ($ val7); // NULL
?>
:
PS: Since the encoding used is UTF-8, a Chinese character occupies 3 bytes while an English character occupies 1 byte.