MatthiasMullie\Scrapbook\Adapters\Memcached::decodeKey PHP Метод

decodeKey() защищенный Метод

Decode a key encoded with encodeKey().
protected decodeKey ( string $key ) : string
$key string
Результат string
    protected function decodeKey($key)
    {
        // matches %20, %7F, ... but not %21, %22, ...
        // (=the encoded versions for those encoded in encodeKey)
        $regex = '/%(?!2[1246789]|3[0-9]|3[B-F]|[4-6][0-9A-F]|5[0-9A-E])[0-9A-Z]{2}/i';
        return preg_replace_callback($regex, function ($match) {
            return rawurldecode($match[0]);
        }, $key);
    }