Source Code:
(back to article)
<?php $var1 = "10"; $var2 = "3.14"; $var3 = "true"; settype($var1, "integer"); settype($var2, "float"); settype($var3, "boolean"); echo $var1 . "\n"; // output: 10 echo $var2 . "\n"; // output: 3.14 echo $var3 . "\n"; // output: 1 ?>
Result:
Report an issue