This exercise creates a variable called "undecided", changes the value of it with settype(), and then tests the type of the variable.
An answer of "1" means it's true (it is a variable of that type); no answer means it is false (it is not a variable of that type).
NOTICE: Changing the type of an integer to a double deletes any information to the right of the decimal point.
Changing the type to "boolean" actually changes the value too!
$undecided = 3.14;
echo "The variable 'undecided' has been declared to be 3.14."."<br />";
echo "Is ".$undecided." a double? ".is_double($undecided)."<br />"; // double
settype($undecided, 'string');
echo "The type of variable 'undecided' has been changed now to 'string'.";
echo "<br />";
echo "Is ".$undecided." a string? ".is_string($undecided)."<br />"; // string
settype($undecided, 'integer');
echo "The type of variable 'undecided' has been changed now to 'integer'.";
echo "<br />";
echo "Is ".$undecided." an integer? ".is_integer($undecided)."<br />"; // integer
settype($undecided, 'double');
echo "The type of variable 'undecided' has been changed now to 'double'.";
echo "<br />";
echo "Is ".$undecided." a double? ".is_double($undecided)."<br />"; // double
settype($undecided, 'bool');
echo "The type of variable 'undecided' has been changed now to 'boolean'.";
echo "<br />";
echo "Is ".$undecided." a boolean? ".is_bool($undecided)."<br />"; // boolean