1--TEST--
2Test preg_quote() function : error conditions  - wrong numbers of parameters
3--FILE--
4<?php
5/*
6* proto string preg_quote(string str [, string delim_char])
7* Function is implemented in ext/pcre/php_pcre.c
8*/
9echo "*** Testing preg_quote() : error conditions ***\n";
10// Zero arguments
11echo "\n-- Testing preg_quote() function with Zero arguments --\n";
12var_dump(preg_quote());
13//Test preg_quote with one more than the expected number of arguments
14echo "\n-- Testing preg_quote() function with more than expected no. of arguments --\n";
15$str = 'string_val';
16$delim_char = '/';
17$extra_arg = 10;
18var_dump(preg_quote($str, $delim_char, $extra_arg));
19echo "Done"
20?>
21--EXPECTF--
22*** Testing preg_quote() : error conditions ***
23
24-- Testing preg_quote() function with Zero arguments --
25
26Warning: preg_quote() expects at least 1 parameter, 0 given in %spreg_quote_error.php on line %d
27NULL
28
29-- Testing preg_quote() function with more than expected no. of arguments --
30
31Warning: preg_quote() expects at most 2 parameters, 3 given in %spreg_quote_error.php on line %d
32NULL
33Done
34