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