Multiple Catch Blocks
Multiple catch blocks allow handling different exceptions separately.
Example
Section titled “Example”try {
throw new RuntimeException("Runtime error");
} catch (InvalidArgumentException $e) {
echo "Invalid argument";
} catch (RuntimeException $e) {
echo "Runtime problem";
}