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