PHP data types include: string, integer, floating point number, Boolean, array, object, NULL.
How to determine the variable type, use the var_dump function.
The var_dump function is to determine the type and length of a variable and output the value of the variable. If the variable has a value, it will lose the value of the variable and return the data type.
'; var_dump($val2);//浮点数 echo '
'; var_dump($val3);//字符串 echo '
'; var_dump($val4);//数组 echo '
'; var_dump($val5);//布尔 echo '
'; var_dump($val6);//对象 echo '
'; var_dump($val7);//NULL ?>
Rendering:
PS: Since the encoding used is UTF-8, each Chinese character occupies 3 bytes, while each English character occupies 1 byte.