private function convertErrorConstants(string $expression): string
    {
        $output = preg_replace_callback('/(E_[a-zA-Z_]+)/', function ($errorConstant) {
            if (defined($errorConstant[1])) {
                return constant($errorConstant[1]);
            }

            return $errorConstant[0];
        }, $expression);

        if (null === $output) {
            throw new \InvalidArgumentException('Unable to parse error types string: ' . $expression);
        }

        return $output;
    }
private function convertErrorConstants(string $expression): string
    {
        $output = preg_replace_callback('/(E_[a-zA-Z_]+)/', function ($errorConstant) {
            if (defined($errorConstant[1])) {
                return constant($errorConstant[1]);
            }

            return $errorConstant[0];
        }, $expression);

        if (null === $output) {
            throw new \InvalidArgumentException('Unable to parse error types string: ' . $expression);
        }

        return $output;
    }
private function convertErrorConstants ( string $ expression ) : string { $ output = preg_replace_callback ( '/(E_[a-zA-Z_]+)/' , function ( $ errorConstant ) { if ( defined ( $ errorConstant [ 1 ] ) ) { return constant ( $ errorConstant [ 1 ] ) ; } return $ errorConstant [ 0 ] ; } , $ expression ) ; if ( null === $ output ) { throw new \ InvalidArgumentException ( 'Unable to parse error types string: ' . $ expression ) ; } return $ output ; }
Converts error constants from string to int.

@param  string $expression e.g. E_ALL & ~E_DEPRECATED & ~E_NOTICE
@return string   converted expression e.g. 32767 & ~8192 & ~8
Converts error constants from string to int .