array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'tr', ), 'this' => array ( 0 => 'errorexception.getseverity.php', 1 => 'ErrorException::getSeverity', ), 'up' => array ( 0 => 'class.errorexception.php', 1 => 'ErrorException', ), 'prev' => array ( 0 => 'errorexception.construct.php', 1 => 'ErrorException::__construct', ), 'next' => array ( 0 => 'class.closedgeneratorexception.php', 1 => 'ClosedGeneratorException', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'tr', 'path' => 'language/predefined/errorexception/getseverity.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.1.0, PHP 7, PHP 8)
ErrorException::getSeverity — İstisnanın önem derecesi ile döner
Bu işlevin bağımsız değişkeni yoktur.
İstisnanın önem derecesini döndürür.
Örnek 1 - ErrorException::getSeverity() örneği
<?php
try {
throw new ErrorException("İstisna iletisi", 0, E_USER_ERROR);
} catch(ErrorException $e) {
echo "Bu istisnanın önem derecesi: " . $e->getSeverity();
var_dump($e->getSeverity() === E_USER_ERROR);
}
?>
Yukarıdaki örnek şuna benzer bir çıktı üretir:
Bu istisnanın önem derecesi: 256 bool(true)