code: public static function toConstantString($level = null, $phpVer = null, $explicitStrict = true)
      {
          $string = '';
          $level = $level === null
              ? \error_reporting()
              : $level;
          $allConstants = self::getConstants($phpVer); // includes E_ALL
          $levelConstants = self::filterConstantsByLevel($allConstants, $level); // excludes E_ALL
          $eAll = $allConstants['E_ALL'];
          unset($allConstants['E_ALL']);
          if (\count($levelConstants) > \count($allConstants) / 2) {
              $string = 'E_ALL';
              foreach ($allConstants as $constantName => $value) {
                  $isExplicit = $explicitStrict
                      && $constantName == 'E_STRICT';
                  if (self::inBitmask($value, $level)) {
                      if (!self::inBitmask($value, $eAll) || $isExplicit) {
                          // only thing that wouldn't be in E_ALL is E_STRICT
                          $string .= ' | ' . $constantName;
                      }
                  } else {
                      if (self::inBitmask($value, $eAll) || $isExplicit) {
                          $string .= ' & ~' . $constantName;
                      }
                  }
              }
          } else {
              $string = \implode(' | ', \array_keys($levelConstants));
          }
          return $string ?: '0';
      }
docs: [toConstantString description]
  
  @param integer $level          Error Level (bitmask) value
  @param string  $phpVer         (PHP_VERSION) php Version
  @param boolean $explicitStrict (true) if level === E_ALL, always include/exclude E_STRICT for disambiguation / portability
  
  @return string