- solve that another way
[m6w6/ext-http] / tests / build_str_001.phpt
1 --TEST--
2 http_build_str
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 ?>
7 --FILE--
8 <?php
9 echo "-TEST\n";
10
11 parse_str($s = "a=b", $q);
12 var_dump($s === http_build_str($q, null, "&"));
13
14 parse_str($s = "a=b&c[0]=1", $q);
15 var_dump($s === http_build_str($q, null, "&"));
16
17 parse_str($s = "a=b&c[0]=1&d[e]=f", $q);
18 var_dump($s === http_build_str($q, null, "&"));
19
20 var_dump("foo[0]=1&foo[1]=2&foo[2][0]=3" === http_build_str(array(1,2,array(3)), "foo", "&"));
21
22 echo "Done\n";
23 ?>
24 --EXPECTF--
25 %sTEST
26 bool(true)
27 bool(true)
28 bool(true)
29 bool(true)
30 Done