1--TEST-- 2Test strripos() function : error conditions 3--FILE-- 4<?php 5/* Prototype : int strripos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack' 7 * Source code: ext/standard/string.c 8*/ 9 10echo "*** Testing strripos() function: error conditions ***"; 11echo "\n-- With Zero arguments --"; 12var_dump( strripos() ); 13 14echo "\n-- With less than expected number of arguments --"; 15var_dump( strripos("String") ); 16 17echo "\n-- With more than expected number of arguments --"; 18var_dump( strripos("string", "String", 1, 'extra_arg') ); 19?> 20===DONE=== 21--EXPECTF-- 22*** Testing strripos() function: error conditions *** 23-- With Zero arguments -- 24Warning: strripos() expects at least 2 parameters, 0 given in %s on line %d 25bool(false) 26 27-- With less than expected number of arguments -- 28Warning: strripos() expects at least 2 parameters, 1 given in %s on line %d 29bool(false) 30 31-- With more than expected number of arguments -- 32Warning: strripos() expects at most 3 parameters, 4 given in %s on line %d 33bool(false) 34===DONE=== 35