llms_php_error_constant_to_code( int $code )
Convert a PHP error constant to a human readable error code
Parameters Parameters
- $code
-
(int) (Required) A predefined php error constant.
Return Return
(string) A human readable string version of the constant.
Source Source
File: includes/llms.functions.core.php
function llms_php_error_constant_to_code( $code ) { $codes = array( E_ERROR => 'E_ERROR', // 1. E_WARNING => 'E_WARNING', // 2. E_PARSE => 'E_PARSE', // 4. E_NOTICE => 'E_NOTICE', // 8. E_CORE_ERROR => 'E_CORE_ERROR', // 16. E_CORE_WARNING => 'E_CORE_WARNING', // 32. E_COMPILE_ERROR => 'E_COMPILE_ERROR', // 64. E_COMPILE_WARNING => 'E_COMPILE_WARNING', // 128. E_USER_ERROR => 'E_USER_ERROR', // 256. E_USER_WARNING => 'E_USER_WARNING', // 512. E_USER_NOTICE => 'E_USER_NOTICE', // 1024. E_STRICT => 'E_STRICT', // 2048. E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR', // 4096. E_DEPRECATED => 'E_DEPRECATED', // 8192. E_USER_DEPRECATED => 'E_USER_DEPRECATED', // 16384. ); return isset( $codes[ $code ] ) ? $codes[ $code ] : $code; }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
4.9.0 | Introduced. |