private function _repack_utf7_callback(array $strings): string
    {
        $strTmp = \base64_decode($strings[1], true);

        if ($strTmp === false) {
            return $strings[0];
        }

        if (\rtrim(\base64_encode($strTmp), '=') !== \rtrim($strings[1], '=')) {
            return $strings[0];
        }

        $string = (string) \preg_replace_callback(
            '/^((?:\x00.)*?)((?:[^\x00].)+)/us',
            function ($matches) {
                return $this->_repack_utf7_callback_back($matches);
            },
            $strTmp
        );

        return (string) \preg_replace(
            '/\x00(.)/us',
            '$1',
            $string
        );
    }
private function _repack_utf7_callback(array $strings): string
    {
        $strTmp = \base64_decode($strings[1], true);

        if ($strTmp === false) {
            return $strings[0];
        }

        if (\rtrim(\base64_encode($strTmp), '=') !== \rtrim($strings[1], '=')) {
            return $strings[0];
        }

        $string = (string) \preg_replace_callback(
            '/^((?:\x00.)*?)((?:[^\x00].)+)/us',
            function ($matches) {
                return $this->_repack_utf7_callback_back($matches);
            },
            $strTmp
        );

        return (string) \preg_replace(
            '/\x00(.)/us',
            '$1',
            $string
        );
    }
private function _repack_utf7_callback ( array $ strings ) : string { $ strTmp = \ base64_decode ( $ strings [ 1 ] , true ) ; if ( $ strTmp === false ) { return $ strings [ 0 ] ; } if ( \ rtrim ( \ base64_encode ( $ strTmp ) , '=' ) !== \ rtrim ( $ strings [ 1 ] , '=' ) ) { return $ strings [ 0 ] ; } $ string = ( string ) \ preg_replace_callback ( '/^((?:\x00.)*?)((?:[^\x00].)+)/us' , function ( $ matches ) { return $ this -> _repack_utf7_callback_back ( $ matches ) ; } , $ strTmp ) ; return ( string ) \ preg_replace ( '/\x00(.)/us' , '$1' , $ string ) ; }
Additional UTF-7 decoding function.

@param string[] $strings <p>Array of strings for recode ASCII part of UTF-7 back to ASCII.</p>

@return string
Additional UTF - 7 decoding function .