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