File: params013.phpt

package info (click to toggle)
php-pecl-http 3.1.0%2B2.6.0-4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,060 kB
  • ctags: 3,725
  • sloc: ansic: 37,486; xml: 818; php: 635; pascal: 164; makefile: 2
file content (79 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download | duplicates (9)
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
72
73
74
75
76
77
78
79
--TEST--
header params rfc5987
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
echo "Test\n";

$p = new http\Params("attachment; filename*=IsO-8859-1''d%f6ner.pdf");
var_dump($p->params, (string) $p);
$p = new http\Params("bar; title*=iso-8859-1'en'%A3%20rates");
var_dump($p->params, (string) $p);
$p = new http\Params("bar; title*=UTF-8''%c2%a3%20and%20%e2%82%ac%20rates");
var_dump($p->params, (string) $p);

?>
===DONE===
--EXPECT--
Test
array(1) {
  ["attachment"]=>
  array(2) {
    ["value"]=>
    bool(true)
    ["arguments"]=>
    array(1) {
      ["*rfc5987*"]=>
      array(1) {
        ["filename"]=>
        array(1) {
          [""]=>
          string(10) "döner.pdf"
        }
      }
    }
  }
}
string(42) "attachment;filename*=utf-8''d%C3%B6ner.pdf"
array(1) {
  ["bar"]=>
  array(2) {
    ["value"]=>
    bool(true)
    ["arguments"]=>
    array(1) {
      ["*rfc5987*"]=>
      array(1) {
        ["title"]=>
        array(1) {
          ["en"]=>
          string(8) "£ rates"
        }
      }
    }
  }
}
string(34) "bar;title*=utf-8'en'%C2%A3%20rates"
array(1) {
  ["bar"]=>
  array(2) {
    ["value"]=>
    bool(true)
    ["arguments"]=>
    array(1) {
      ["*rfc5987*"]=>
      array(1) {
        ["title"]=>
        array(1) {
          [""]=>
          string(16) "£ and € rates"
        }
      }
    }
  }
}
string(50) "bar;title*=utf-8''%C2%A3%20and%20%E2%82%AC%20rates"
===DONE===