1--TEST--
2Test strcoll() function : error conditions
3--FILE--
4<?php
5/* Prototype: int strcoll  ( string $str1  , string $str2  )
6   Description: Locale based string comparison
7*/
8
9echo "*** Testing strcoll() : error conditions ***\n";
10
11echo "\n-- Testing strcoll() function with no arguments --\n";
12var_dump( strcoll() );
13var_dump( strcoll("") );
14
15echo "\n-- Testing strcoll() function with one argument --\n";
16var_dump( strcoll("Hello World") );
17
18echo "\n-- Testing strcoll() function with more than expected no. of arguments --\n";
19$extra_arg = 10;
20var_dump( strcoll("Hello World",  "World", $extra_arg) );
21
22?>
23===Done===
24--EXPECTF--
25*** Testing strcoll() : error conditions ***
26
27-- Testing strcoll() function with no arguments --
28
29Warning: strcoll() expects exactly 2 parameters, 0 given in %s on line %d
30NULL
31
32Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d
33NULL
34
35-- Testing strcoll() function with one argument --
36
37Warning: strcoll() expects exactly 2 parameters, 1 given in %s on line %d
38NULL
39
40-- Testing strcoll() function with more than expected no. of arguments --
41
42Warning: strcoll() expects exactly 2 parameters, 3 given in %s on line %d
43NULL
44===Done===