PHP program that accepts six numbers as input and sorts them in descending order.
<?php
$stdin = trim(fgets(STDIN));
$nums = explode(" ", $stdin);
rsort($nums);
print("After sorting the said integers:\n");
echo implode(' ', $nums);
?>
Output:
After sorting the said integers:
9 8 7 6 4 2
