note 95453 deleted from errorfunc.constants by danbrown

From: Date: Mon, 04 Jan 2010 16:03:08 +0000
Subject: note 95453 deleted from errorfunc.constants by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-164610@lists.php.net to get a copy of this message
Note Submitter: rene ---- <?php function debugErrorType_humanReadable ($errNo) { if (phpversion() < '4.0.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 2047 => 'E_ALL' ); } elseif (phpversion() < '5.0.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024=> 'User Notice', 2047=> 'E_ALL' ); } elseif (phpversion() < '5.2.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024=> 'User Notice', 2048=> 'Strict', 2047=> 'E_ALL' /// ----> STRANGE.... ); } elseif (phpversion() < '5.3.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024=> 'User Notice', 2048=> 'Strict', 4096=> 'Recoverable', 6143=> 'E_ALL' ); } elseif (phpversion() >= '5.3.0' && phpversion() < '5.4.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024=> 'User Notice', 2048=> 'Strict', 4096=> 'Recoverable', 8192=> 'Depracated', 16384=> 'User-level Depracated', 30719=> 'E_ALL' ); } elseif (phpversion() >= '6.0.0') { $errorTypes = array ( 1 => 'Error', 2 => 'Warning', 4 => 'Parsing Error', 8 => 'Notice', 16 => 'Core Error', 32 => 'Core Warning', 64 => 'Compile Error', 128 => 'Compile Warning', 256 => 'User Error', 512 => 'User Warning', 1024=> 'User Notice', 2048=> 'Strict', 4096=> 'Recoverable', 8192=> 'Depracated', 16384=> 'User-level Depracated', 32767=> 'E_ALL' ); } return $errorType[$errNo]; } ?>

« previous php.notes (#164610) next »