File: params014.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 (70 lines) | stat: -rw-r--r-- 1,270 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
--TEST--
header params rfc5987
--SKIPIF--
<?php
include "skipif.inc";
?>
--FILE--
<?php
echo "Test\n";
$u = urlencode("ü");
$s = urlencode("ß");
$t = "p1*=utf-8''s$u$s,p2*=utf-8''hei$s;a1*=utf-8''a$s;a2*=utf-8''e$s;a3=no,p3=not";
$p = new http\Params($t);
var_dump($p->params);
var_dump((string)$p === $t, (string)$p, $t);
?>
===DONE===
--EXPECT--
Test
array(3) {
  ["p1"]=>
  array(2) {
    ["*rfc5987*"]=>
    array(1) {
      [""]=>
      string(5) "süß"
    }
    ["arguments"]=>
    array(0) {
    }
  }
  ["p2"]=>
  array(2) {
    ["*rfc5987*"]=>
    array(1) {
      [""]=>
      string(5) "heiß"
    }
    ["arguments"]=>
    array(2) {
      ["*rfc5987*"]=>
      array(2) {
        ["a1"]=>
        array(1) {
          [""]=>
          string(3) "aß"
        }
        ["a2"]=>
        array(1) {
          [""]=>
          string(3) "eß"
        }
      }
      ["a3"]=>
      string(2) "no"
    }
  }
  ["p3"]=>
  array(2) {
    ["value"]=>
    string(3) "not"
    ["arguments"]=>
    array(0) {
    }
  }
}
bool(true)
string(96) "p1*=utf-8''s%C3%BC%C3%9F,p2*=utf-8''hei%C3%9F;a1*=utf-8''a%C3%9F;a2*=utf-8''e%C3%9F;a3=no,p3=not"
string(96) "p1*=utf-8''s%C3%BC%C3%9F,p2*=utf-8''hei%C3%9F;a1*=utf-8''a%C3%9F;a2*=utf-8''e%C3%9F;a3=no,p3=not"
===DONE===