PHP - Error and Exception Handling
Find the error in this PHP code snippet:
try {
echo "Test";
} catch Exception $e {
echo "Error";
}
Find the error in this PHP code snippet:
try {
echo "Test";
} catch Exception $e {
echo "Error";
}
catch syntaxcatch block must have parentheses around the exception type and variable.catch Exception $e without parentheses, which is invalid syntax.catch syntax requires parentheses [OK]catch block [OK]catchfinally is mandatory15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions