Created
October 28, 2013 12:32
-
-
Save SergSlon/7196034 to your computer and use it in GitHub Desktop.
php errors codes .htaccess php_value error_reporting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $error_number = 22527; | |
| $error_description = array( ); | |
| $error_codes = array( | |
| E_ERROR => "E_ERROR", | |
| E_WARNING => "E_WARNING", | |
| E_PARSE => "E_PARSE", | |
| E_NOTICE => "E_NOTICE", | |
| E_CORE_ERROR => "E_CORE_ERROR", | |
| E_CORE_WARNING => "E_CORE_WARNING", | |
| E_COMPILE_ERROR => "E_COMPILE_ERROR", | |
| E_COMPILE_WARNING => "E_COMPILE_WARNING", | |
| E_USER_ERROR => "E_USER_ERROR", | |
| E_USER_WARNING => "E_USER_WARNING", | |
| E_USER_NOTICE => "E_USER_NOTICE", | |
| E_STRICT => "E_STRICT", | |
| E_RECOVERABLE_ERROR => "E_RECOVERABLE_ERROR", | |
| E_DEPRECATED => "E_DEPRECATED", | |
| E_USER_DEPRECATED => "E_USER_DEPRECATED", | |
| E_ALL => "E_ALL" | |
| ); | |
| foreach( $error_codes as $number => $description ) | |
| { | |
| if ( ( $number & $error_number ) == $number ) | |
| { | |
| $error_description[ ] = $description; | |
| } | |
| } | |
| echo sprintf( | |
| "error number %d corresponds to:\n%s", | |
| $error_number, | |
| implode( " | ", $error_description ) | |
| ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment