Annotation of embedaddon/php/ext/standard/tests/strings/parse_str_error1.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Test parse_str() function : non-default arg_separator.input specified
3: --INI--
4: arg_separator.input = "/"
5: --FILE--
6: <?php
7: /* Prototype : void parse_str ( string $str [, array &$arr ] )
8: * Description: Parses the string into variables
9: * Source code: ext/standard/string.c
10: */
11:
12: echo "*** Testing parse_str() : error conditions ***\n";
13:
14: echo "\n-- Testing htmlentities() function with less than expected no. of arguments --\n";
15: parse_str();
16: echo "\n-- Testing htmlentities() function with more than expected no. of arguments --\n";
17: $s1 = "first=val1&second=val2&third=val3";
18: parse_str($s1, $res_array, true);
19:
20: ?>
21: ===DONE===
22: --EXPECTF--
23: *** Testing parse_str() : error conditions ***
24:
25: -- Testing htmlentities() function with less than expected no. of arguments --
26:
27: Warning: parse_str() expects at least 1 parameter, 0 given in %s on line %d
28:
29: -- Testing htmlentities() function with more than expected no. of arguments --
30:
31: Warning: parse_str() expects at most 2 parameters, 3 given in %s on line %d
32: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>