phpstan-exception-rules
phpstan-exception-rules copied to clipboard
random_int and random_bytes exceptions
Both random_int and random_bytes internal functions throw Exception (among others), but if you try catching it - you get an error Exception is never thrown in the corresponding try block.
Code to reproduce:
try {
random_int(0, PHP_INT_MAX);
catch (Exception) {
}