1--TEST-- 2Bug #53377 (imap_mime_header_decode() doesn't ignore \t during long MIME header unfolding) 3--SKIPIF-- 4<?php 5 if (!extension_loaded("imap")) { 6 die("skip imap extension not available"); 7 } 8?> 9--FILE-- 10<?php 11$s = "=?UTF-8?Q?=E2=82=AC?="; 12$header = "$s\n $s\n\t$s"; 13 14var_dump(imap_mime_header_decode($header)); 15--EXPECT-- 16array(3) { 17 [0]=> 18 object(stdClass)#1 (2) { 19 ["charset"]=> 20 string(5) "UTF-8" 21 ["text"]=> 22 string(3) "€" 23 } 24 [1]=> 25 object(stdClass)#2 (2) { 26 ["charset"]=> 27 string(5) "UTF-8" 28 ["text"]=> 29 string(3) "€" 30 } 31 [2]=> 32 object(stdClass)#3 (2) { 33 ["charset"]=> 34 string(5) "UTF-8" 35 ["text"]=> 36 string(3) "€" 37 } 38} 39