App下载

demo_func_string_settype 在线工具

demo_func_string_settype 在线工具

<?php
$foo = "5w3cschool"; // string
$bar = true;   // boolean

settype($foo, "integer"); // $foo 现在是 5   (integer)
settype($bar, "string");  // $bar 现在是 "1" (string)

print_r($foo);
print_r($bar);
?>
运行结果