$type_examples[0] = 123;
$type_examples[1] = 3.14159;
$type_examples[2] = "a string";
$type_examples[3] = "9.990 (begins with number)";
$type_examples[4] = array(9,8,7);
print("");
print("Original ");
print(" (int) ");
print(" (double) ");
print(" (string) ");
print(" (array) ");
for ($index = 0; $index < 5; $index++){
print("$type_examples[$index] ");
$converted_var =
(int) $type_examples[$index];
print("$converted_var ");
$converted_var =
(double) $type_examples[$index];
print("$converted_var ");
$converted_var =
(string) $type_examples[$index];
print("$converted_var ");
$converted_var =
(array) $type_examples[$index];
print("$converted_var ");
}
print("
");
?>