1--TEST-- 2Test strnatcmp() function : error conditions 3--FILE-- 4<?php 5/* Prototype : int strnatcmp ( string $str1 , string $str2 ) 6 * Description: String comparisons using a "natural order" algorithm 7 * Source code: ext/standard/string.c 8*/ 9echo "*** Testing strnatcmp() : error conditions ***\n"; 10 11echo "-- Testing strnatcmp() function with Zero arguments --\n"; 12var_dump( strnatcmp() ); 13 14echo "\n\n-- Testing strnatcmp() function with more than expected no. of arguments --\n"; 15$str1 = "abc1"; 16$str2 = "ABC1"; 17$extra_arg = 10; 18var_dump( strnatcmp( $str1, $str2, $extra_arg) ); 19 20?> 21===DONE=== 22--EXPECTF-- 23*** Testing strnatcmp() : error conditions *** 24-- Testing strnatcmp() function with Zero arguments -- 25 26Warning: strnatcmp() expects exactly 2 parameters, 0 given in %s on line %d 27NULL 28 29 30-- Testing strnatcmp() function with more than expected no. of arguments -- 31 32Warning: strnatcmp() expects exactly 2 parameters, 3 given in %s on line %d 33NULL 34===DONE=== 35