summaryrefslogtreecommitdiff
path: root/ext/iconv/tests/bug63839.phpt
blob: 22f601ee59b19d5aa7cee1d0a41786886a672cfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--TEST--
Bug #63839 (iconv_mime_decode_headers function is skipping headers)
--SKIPIF--
<?php
if (!extension_loaded('iconv')) die('skip iconv extension not available');
?>
--FILE--
<?php
$headers = 'From: "xyz" <xyz@xyz.com>
To: <xyz@xyz.com>
Subject: Reply Is? white side-LED =? in Help
Date: Sat, 22 Dec 2012
Message-ID: <006f01cde00e$d9f79da0$8de6d8e0>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0"
X-Mailer: Microsoft Office Outlook 12.0
Thread-Index: Ac3gDtcH2huHjzYcQVmFJPPoWjJogA==
Content-Language: en-us

';
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_CONTINUE_ON_ERROR));
var_dump(iconv_mime_decode_headers($headers, ICONV_MIME_DECODE_STRICT));
?>
===DONE===
--EXPECT--
array(10) {
  ["From"]=>
  string(19) ""xyz" <xyz@xyz.com>"
  ["To"]=>
  string(13) "<xyz@xyz.com>"
  ["Subject"]=>
  string(35) "Reply Is? white side-LED =? in Help"
  ["Date"]=>
  string(16) "Sat, 22 Dec 2012"
  ["Message-ID"]=>
  string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
  ["MIME-Version"]=>
  string(3) "1.0"
  ["Content-Type"]=>
  string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
  ["X-Mailer"]=>
  string(29) "Microsoft Office Outlook 12.0"
  ["Thread-Index"]=>
  string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
  ["Content-Language"]=>
  string(5) "en-us"
}
array(10) {
  ["From"]=>
  string(19) ""xyz" <xyz@xyz.com>"
  ["To"]=>
  string(13) "<xyz@xyz.com>"
  ["Subject"]=>
  string(35) "Reply Is? white side-LED =? in Help"
  ["Date"]=>
  string(16) "Sat, 22 Dec 2012"
  ["Message-ID"]=>
  string(32) "<006f01cde00e$d9f79da0$8de6d8e0>"
  ["MIME-Version"]=>
  string(3) "1.0"
  ["Content-Type"]=>
  string(75) "multipart/alternative; boundary="----=_NextPart_000_0070_01CDE03C.F3AFD9A0""
  ["X-Mailer"]=>
  string(29) "Microsoft Office Outlook 12.0"
  ["Thread-Index"]=>
  string(32) "Ac3gDtcH2huHjzYcQVmFJPPoWjJogA=="
  ["Content-Language"]=>
  string(5) "en-us"
}
===DONE===