PHP - Error and Exception Handling
Consider this PHP code snippet:
try {
throw new Error('Fatal error');
} catch (Exception $e) {
echo 'Exception caught';
} catch (Throwable $e) {
echo 'Throwable caught';
}What will be the output?
Consider this PHP code snippet:
try {
throw new Error('Fatal error');
} catch (Exception $e) {
echo 'Exception caught';
} catch (Throwable $e) {
echo 'Throwable caught';
}What will be the output?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions