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