CKTIS / PHP
rawurldecode()
Decodifica in byte le coppie con percentuale di un componente URL.
Versione: PHP 8.4; repository runtime, production runtime not attested
Sintassi
rawurldecode(string $string): stringDecodifica in byte le coppie con percentuale di un componente URL. Il più resta più e %20 diventa spazio. Le sequenze errate restano nel testo, quindi la decodifica non convalida l’ingresso.
Firma
rawurldecode(string $string): string
Output dell’esempio
["a+b c+d","%ZZ","00ff"]
Esempi
<?php
echo json_encode([rawurldecode("a+b%20c%2Bd"),rawurldecode("%ZZ"),bin2hex(rawurldecode("%00%FF"))]);
Risultato
["a+b c+d","%ZZ","00ff"]