2 /* Prototype : proto int iconv_strrpos(string haystack, string needle [, string charset])
3 * Description: Find position of last occurrence of a string within another
4 * Source code: ext/iconv/iconv.c
8 * Pass iconv_strrpos() an incorrect number of arguments
11 echo "*** Testing iconv_strrpos() : error conditions ***\n";
14 //Test iconv_strrpos with one more than the expected number of arguments
15 echo "\n-- Testing iconv_strrpos() function with more than expected no. of arguments --\n";
16 $haystack = 'string_val';
17 $needle = 'string_val';
18 $encoding = 'string_val';
20 try { var_dump( iconv_strrpos($haystack, $needle, $encoding, $extra_arg) ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }
22 // Testing iconv_strrpos with one less than the expected number of arguments
23 echo "\n-- Testing iconv_strrpos() function with less than expected no. of arguments --\n";
24 $haystack = 'string_val';
25 try { var_dump( iconv_strrpos($haystack) ); } catch (Exception
$e) { echo "\n".'Warning: '.$e->getMessage().' in '.__FILE__
.' on line '.__LINE__
."\n"; }