echo gettype($var1)."
";
echo gettype($var2)."
";
echo gettype($var3)."
";
<?php
$foo = "5bar"; // string
$bar = true; // boolean
settype($foo, "integer"); // $foo is 5 (integer)
settype($bar, "string"); // $bar is "1" (string)
?>
<?php
$fruits = array('apple', 'banana', 'cranberry');
echo end($fruits); // cranberry
?>