PHP: Type Casting in PHP
'test');
echo (int) (7 > 5); // Output: 1, ie: Calculates as true, outputs 1,
// (int) doesn't do anything in
// this scenario since true
// outputs as 1;
echo (int) (5 > 6); // Output: 0, ie: Calculates as false, result is false,
// (int) turns false into 0;
echo (int) ('CAT' > 'DOG'); // Output: false, The letter D
// is a higher value and C
echo (int) ('pig' > 'Pig'); // Output: true, The letter p
//is a higher ASCII value than P
?>
