1--TEST--
2Test sql_regcase() function : error conditions
3--FILE--
4<?php
5/* Prototype  : proto string sql_regcase(string string)
6 * Description: Make regular expression for case insensitive match
7 * Source code: ext/standard/reg.c
8 * Alias to functions: msql_regcase
9 */
10
11echo "*** Testing sql_regcase() : error conditions ***\n";
12
13// Zero arguments
14echo "\n-- Testing sql_regcase() function with Zero arguments --\n";
15var_dump( sql_regcase() );
16
17//Test sql_regcase with one more than the expected number of arguments
18echo "\n-- Testing sql_regcase() function with more than expected no. of arguments --\n";
19$string = 'string_val';
20$extra_arg = 10;
21var_dump( sql_regcase($string, $extra_arg) );
22
23echo "Done";
24?>
25--EXPECTF--
26*** Testing sql_regcase() : error conditions ***
27
28-- Testing sql_regcase() function with Zero arguments --
29
30Deprecated: Function sql_regcase() is deprecated in %s on line %d
31
32Warning: sql_regcase() expects exactly 1 parameter, 0 given in %s on line %d
33NULL
34
35-- Testing sql_regcase() function with more than expected no. of arguments --
36
37Deprecated: Function sql_regcase() is deprecated in %s on line %d
38
39Warning: sql_regcase() expects exactly 1 parameter, 2 given in %s on line %d
40NULL
41Done
42