1--TEST-- 2Test mb_regex_encoding() function : basic functionality 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 : proto 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 * Test Basic functionality of mb_regex_encoding 17 */ 18 19echo "*** Testing mb_regex_encoding() : basic functionality ***\n"; 20 21var_dump(mb_regex_encoding()); 22 23var_dump(mb_regex_encoding('UTF-8')); 24 25var_dump(mb_regex_encoding()); 26 27 28echo "Done"; 29?> 30--EXPECTF-- 31*** Testing mb_regex_encoding() : basic functionality *** 32string(%d) "%s" 33bool(true) 34string(5) "UTF-8" 35Done 36