xref: /PHP-8.2/ext/imap/tests/bug53377.phpt (revision 39131219)
1--TEST--
2Bug #53377 (imap_mime_header_decode() doesn't ignore \t during long MIME header unfolding)
3--EXTENSIONS--
4imap
5--FILE--
6<?php
7$s = "=?UTF-8?Q?=E2=82=AC?=";
8$header = "$s\n $s\n\t$s";
9
10var_dump(imap_mime_header_decode($header));
11?>
12--EXPECT--
13array(3) {
14  [0]=>
15  object(stdClass)#1 (2) {
16    ["charset"]=>
17    string(5) "UTF-8"
18    ["text"]=>
19    string(3) "€"
20  }
21  [1]=>
22  object(stdClass)#2 (2) {
23    ["charset"]=>
24    string(5) "UTF-8"
25    ["text"]=>
26    string(3) "€"
27  }
28  [2]=>
29  object(stdClass)#3 (2) {
30    ["charset"]=>
31    string(5) "UTF-8"
32    ["text"]=>
33    string(3) "€"
34  }
35}
36