1.2.37. Anonymous Catch¶
It is possible to omit the variable when using a catch clause. It will catch the exception, but it will not provide the details of the caught exception.
<?php
try {
} catch (Exception) {
}
?>
1.2.37.1. Specs¶
Short name |
Exceptions/AnonymousCatch |
Rulesets |
|
Exakat since |
2.6.8 |
PHP Version |
With PHP 8.0 and more recent |
Severity |
Minor |
Time To Fix |
Quick (30 mins) |
Precision |
Very high |
Available in |