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