PHP 8.5.0 Beta 1 available for testing

Voting

: three plus two?
(Example: nine)

The Note You're Voting On

naitsirch at e dot mail dot de
5 years ago
If there is a NULL byte in the string that is passed, quoted_printable_decode will crop everything after the NULL byte and the NULL byte itself.

<?php
$result
= quoted_printable_decode("This is a\0 test.");
// $result === 'This is a'
?>

This is not a bug, but the intended behaviour and defined by RFC 2045 (see https://www.ietf.org/rfc/rfc2045.txt) in paragraph 2.7 and 2.8.

<< Back to user notes page

To Top