Input
Output
<?php // Define two numbers $num1 = 20; $num2 = 10; // Perform operations $sum = $num1 + $num2; $difference = $num1 - $num2; $product = $num1 * $num2; // Handle division carefully to avoid division by zero if ($num2 != 0) { $quotient = $num1 / $num2; echo "Quotient: $quotient<br>"; } else { echo "Division by zero is not allowed.<br>"; } // Display results echo "Sum: $sum<br>"; echo "Difference: $difference<br>"; echo "Product: $product<br>"; ?>