What is Exception severity in PHP?

Viewed 1630

I saw this code in the PHP documentation:

try {
throw new ErrorException("Exception message", 0, E_USER_ERROR);
} catch(ErrorException $e) {
echo "This exception severity is: " . $e->getSeverity();
var_dump($e->getSeverity() === E_USER_ERROR);
}

And it continues:

This exception severity is: 256
bool(true)

What does exception severity mean, and do I have to use it at all?

1 Answers
Related