标签:
一,setType函数转换
$var=10; //setType($var,"int"); //setType($var,"double"); settype($var,"string"); echo getType($var); //输出string echo $var;
二,在变量类型前面添加类型
$var=10; echo getType($var); $d = (string)$var; echo getType($d);
三,intval,floatval,strval转换
$var=10; echo getType($var); $d = strval($var); echo getType($d);
标签:
原文地址:http://www.cnblogs.com/July7th/p/5603609.html