- changelog
[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("a=b", $q);
12 echo http_build_str($q, null, "&"), "\n";
13
14 parse_str("a=b&c[0]=1", $q);
15 echo http_build_str($q, null, "&"), "\n";
16
17 parse_str("a=b&c[0]=1&d[e]=f", $q);
18 echo http_build_str($q, null, "&"), "\n";
19
20 echo http_build_str(array(1,2,array(3)), "foo", "&"), "\n";
21
22 echo "Done\n";
23 ?>
24 --EXPECTF--
25 %sTEST
26 a=b
27 a=b&c%5B0%5D=1
28 a=b&c%5B0%5D=1&d%5Be%5D=f
29 foo%5B0%5D=1&foo%5B1%5D=2&foo%5B2%5D%5B0%5D=3
30 Done