1--TEST--
2Test rawurldecode() function : error conditions - wrong number of args
3--FILE--
4<?php
5/* Prototype  : proto string rawurldecode(string str)
6 * Description: Decodes URL-encodes string
7 * Source code: ext/standard/url.c
8 * Alias to functions:
9 */
10
11// NB: basic functionality tested in tests/strings/001.phpt
12
13echo "*** Testing rawurldecode() : error conditions ***\n";
14
15// Zero arguments
16echo "\n-- Testing rawurldecode() function with Zero arguments --\n";
17var_dump( rawurldecode() );
18
19//Test rawurldecode with one more than the expected number of arguments
20echo "\n-- Testing rawurldecode() function with more than expected no. of arguments --\n";
21$str = 'string_val';
22$extra_arg = 10;
23var_dump( rawurldecode($str, $extra_arg) );
24
25echo "Done";
26?>
27--EXPECTF--
28*** Testing rawurldecode() : error conditions ***
29
30-- Testing rawurldecode() function with Zero arguments --
31
32Warning: rawurldecode() expects exactly 1 parameter, 0 given in %s on line 14
33NULL
34
35-- Testing rawurldecode() function with more than expected no. of arguments --
36
37Warning: rawurldecode() expects exactly 1 parameter, 2 given in %s on line 20
38NULL
39Done
40