查看变量类型函数: gettype($value);
查看变量值和类型:var_dump($vale);
强制转换数据类型
$str = (string)$name;
使用is_type()来判断某变量的类型
if(is_string($str)){
echo "$str 是一个字符类型";
}
永久转换类型
settype(var,type);
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!