protected function validEncoding($value)
    {
        static $encodings;
        if (isset($encodings) === false && function_exists('mb_list_encodings')) {
            $encodings = mb_list_encodings();
        }

        if (empty($encodings) || \is_array($encodings) === false) {
            // If we can't test the encoding, let it pass through.
            return true;
        }

        return \in_array($value, $encodings, true);
    }
protected function validEncoding($value)
    {
        static $encodings;
        if (isset($encodings) === false && function_exists('mb_list_encodings')) {
            $encodings = mb_list_encodings();
        }

        if (empty($encodings) || \is_array($encodings) === false) {
            // If we can't test the encoding, let it pass through.
            return true;
        }

        return \in_array($value, $encodings, true);
    }
protected function validEncoding ( $ value ) { static $ encodings ; if ( isset ( $ encodings ) === false && function_exists ( 'mb_list_encodings' ) ) { $ encodings = mb_list_encodings ( ) ; } if ( empty ( $ encodings ) || \ is_array ( $ encodings ) === false ) { // If we can't test the encoding, let it pass through. return true ; } return \ in_array ( $ value , $ encodings , true ) ; }
Check whether a value is a valid encoding.

Callback function to test whether the value for an execution directive is valid.

@param mixed $value The value to test.

@return bool
Check whether a value is a valid encoding .