quoted_printable_decode()
quoted_printable_decode() — Convert a quoted-printable string to an 8 bit string.
Built-in function of PHP 8.5. The manual lists it as available in PHP 4, PHP 5, PHP 7, PHP 8. This page is the reference card: signature, parameters and return value, plus the changelog and the example the manual provides.
What it does
This function is similar to imap_qprint(), except this one does not require the IMAP module to work.
Signature
quoted_printable_decode(string $string): string
Parameters
| Parameter | Type | What it takes |
|---|---|---|
| $string | string | The input string. |
Return value
Returns the 8-bit binary string.
Example
A runnable snippet:
$encoded = quoted_printable_encode('Möchten Sie ein paar Äpfel?'); var_dump($encoded); var_dump(quoted_printable_decode($encoded));
Output:
string(37) "M=C3=B6chten Sie ein paar =C3=84pfel?" string(29) "Möchten Sie ein paar Äpfel?"
See also
All PHP 8.5 built-in functions
Reference card built from the PHP manual page quoted_printable_decode() (PHP documentation, CC BY 3.0). The page is generated from the manual, so the wording of the parameter and return value text follows php.net.