ErrorException::getSeverity
ErrorException::getSeverity
Gets the exception severity
int **ErrorException::getSeverity**
Returns the severity of the exception.
Returns the severity level of the exception.
Voorbeeld: example
<?php
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);
}
?>
This exception severity is: 256
bool(true)