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