ErrorException::getSeverity

(PHP 5 >= 5.1.0, PHP 7)

ErrorException::getSeverity锟斤拷取锟届常锟斤拷锟斤拷锟截程讹拷

说锟斤拷

final public ErrorException::getSeverity ( void ) : int

锟斤拷锟斤拷锟届常锟斤拷锟斤拷锟截程度★拷

锟斤拷锟斤拷

锟剿猴拷锟斤拷没锟叫诧拷锟斤拷锟斤拷

锟斤拷锟斤拷值

锟斤拷锟斤拷锟届常锟斤拷锟斤拷锟截硷拷锟斤拷

锟斤拷锟斤拷

Example #1 ErrorException::getSeverity() 锟斤拷锟斤拷

<?php
try {
    throw new 
ErrorException("Exception message"0E_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)