1--TEST--
2Test iconv_strrpos() function : error conditions - pass an unknown encoding
3--SKIPIF--
4<?php
5extension_loaded('iconv') or die('skip');
6function_exists('iconv_strrpos') or die("skip iconv_strrpos() is not available in this build");
7?>
8--FILE--
9<?php
10/*
11 * Pass iconv_strrpos() an encoding that doesn't exist
12 */
13
14echo "*** Testing iconv_strrpos() : error conditions ***\n";
15
16$haystack = 'This is an English string. 0123456789.';
17$needle = '123';
18$offset = 5;
19$encoding = 'unknown-encoding';
20
21var_dump(iconv_strrpos($haystack, $needle , $encoding));
22
23echo "Done";
24?>
25--EXPECTF--
26*** Testing iconv_strrpos() : error conditions ***
27
28Warning: iconv_strrpos(): Wrong encoding, conversion from "unknown-encoding" to "UCS-4LE" is not allowed in %s on line %d
29bool(false)
30Done
31