What is 22527 in error_reporting 22527 of phpinfo

Solution 1:

This value is actually bitmap mask, a sum of constants.

So, 22527 is

  16384 E_USER_DEPRECATED
+
  4096  E_RECOVERABLE_ERROR
+
  etc...

In your case it's E_ALL & ~E_DEPRECATED, it will display every error, except E_DEPRECATED.

PHP versions below 5.4 will also exclude E_STRICT errors (since E_STRICT is not included in E_ALL before that version)

Solution 2:

This value is one or more of these constants bitwise-ored together.

phpinfo() usually displays the numeric value instead of the constants or shorthands used inside INI files. Here is an example to map the value back to constants:

<?php
$error_reporting_value = 22527;
$constants = array(
    "E_ERROR",
    "E_WARNING",
    "E_PARSE",
    "E_NOTICE",
    "E_CORE_ERROR",
    "E_CORE_WARNING",
    "E_COMPILE_ERROR",
    "E_COMPILE_WARNING",
    "E_USER_ERROR",
    "E_USER_WARNING",
    "E_USER_NOTICE",
    "E_STRICT",
    "E_RECOVERABLE_ERROR",
    "E_DEPRECATED",
    "E_USER_DEPRECATED",
    "E_ALL"
);
$included = array();
$excluded = array();
foreach ($constants as $constant) {
    $value = constant($constant);
    if (($error_reporting_value & $value) === $value) {
        $included[] = $constant;
    } else {
        $excluded[] = $constant;
    }
}
echo "error reporting " . $error_reporting_value . PHP_EOL;
echo "includes " . implode(", ", $included) . PHP_EOL;
echo "excludes " . implode(", ", $excluded) . PHP_EOL;

Output:

error reporting 22527
includes E_ERROR, E_WARNING, E_PARSE, E_NOTICE, E_CORE_ERROR, E_CORE_WARNING, E_COMPILE_ERROR, E_COMPILE_WARNING, E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_RECOVERABLE_ERROR, E_USER_DEPRECATED
excludes E_STRICT, E_DEPRECATED, E_ALL