1--TEST--
2Test mb_strtolower() function : error conditions - pass an unknown encoding
3--SKIPIF--
4<?php
5extension_loaded('mbstring') or die('skip');
6function_exists('mb_strtolower') or die("skip mb_strtolower() is not available in this build");
7?>
8--FILE--
9<?php
10/* Prototype  : string mb_strtolower(string $sourcestring [, string $encoding])
11 * Description: Returns a lowercased version of $sourcestring
12 * Source code: ext/mbstring/mbstring.c
13 */
14
15/*
16 * Pass an unknown encoding to mb_strtolower() to test behaviour
17 */
18
19echo "*** Testing mb_strtolower() : error conditions***\n";
20
21$sourcestring = 'hello, world';
22$encoding = 'unknown-encoding';
23
24var_dump( mb_strtolower($sourcestring, $encoding) );
25?>
26===DONE===
27--EXPECTF--
28*** Testing mb_strtolower() : error conditions***
29
30Warning: mb_strtolower(): Unknown encoding "unknown-encoding" in %s on line %d
31bool(false)
32===DONE===
33