Skip to content

Instantly share code, notes, and snippets.

@AllenJB
Created February 18, 2015 17:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AllenJB/2217955c1789f8db7e6c to your computer and use it in GitHub Desktop.
Save AllenJB/2217955c1789f8db7e6c to your computer and use it in GitHub Desktop.
<?php
$type = error_reporting();
$levels = array (
'E_ERROR' => (($type & E_ERROR) == E_ERROR),
'E_WARNING' => (($type & E_WARNING) == E_WARNING),
'E_PARSE' => (($type & E_PARSE) == E_PARSE),
'E_NOTICE' => (($type & E_NOTICE) == E_NOTICE),
'E_CORE_ERROR' => (($type & E_CORE_ERROR) == E_CORE_ERROR),
'E_CORE_WARNING' => (($type & E_CORE_WARNING) == E_CORE_WARNING),
'E_COMPILE_ERROR' => (($type & E_COMPILE_ERROR) == E_COMPILE_ERROR),
'E_COMPILE_WARNING' => (($type & E_COMPILE_WARNING) == E_COMPILE_WARNING),
'E_USER_ERROR' => (($type & E_USER_ERROR) == E_USER_ERROR),
'E_USER_WARNING' => (($type & E_USER_WARNING) == E_USER_WARNING),
'E_USER_NOTICE' => (($type & E_USER_NOTICE) == E_USER_NOTICE),
'E_STRICT' => (defined('E_STRICT') && (($type & E_STRICT) == E_STRICT)),
'E_RECOVERABLE_ERROR' => (defined('E_RECOVERABLE_ERROR') && (($type & E_RECOVERABLE_ERROR) == E_RECOVERABLE_ERROR)),
'E_DEPRECATED' => (defined('E_DEPRECATED') && (($type & E_DEPRECATED) == E_DEPRECATED)),
'E_USER_DEPRECATED' => (defined('E_USER_DEPRECATED') && (($type & E_USER_DEPRECATED) == E_USER_DEPRECATED)),
'E_ALL' => (($type & E_ALL) == E_ALL),
);
print '<pre>'. print_r ($levels, true) .'</pre>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment