CKTIS / PHP
rawurldecode()
Dekóduje percentové dvojice v časti URL na bajty.
Verzia: PHP 8.4; repository runtime, production runtime not attested
Syntax
rawurldecode(string $string): stringDekóduje percentové dvojice v časti URL na bajty. Plus zostane plusom a %20 sa zmení na medzeru. Neplatné percentové zápisy zostanú v texte, samotné dekódovanie teda neoverí vstup.
Signatúra
rawurldecode(string $string): string
Výstup príkladu
["a+b c+d","%ZZ","00ff"]
Príklady
<?php
echo json_encode([rawurldecode("a+b%20c%2Bd"),rawurldecode("%ZZ"),bin2hex(rawurldecode("%00%FF"))]);
Výsledok
["a+b c+d","%ZZ","00ff"]