(PHP 4, PHP 5, PHP 7)
settype — 设置变量的类型
var要转换的变量。
type
       type 的可能值为:
       
   成功时返回 TRUE, 或者在失败时返回 FALSE。
  
Example #1 settype() 示例
<?php
$foo = "5bar"; // string
$bar = true;   // boolean
settype($foo, "integer"); // $foo 现在是 5   (integer)
settype($bar, "string");  // $bar 现在是 "1" (string)
?>
Note:
Maximum value for "int" is
PHP_INT_MAX.