1--TEST--
2mb_convert_encoding() when encoding detection fails
3--EXTENSIONS--
4mbstring
5--INI--
6mbstring.strict_detection=1
7--FILE--
8<?php
9
10var_dump(mb_convert_encoding("\xff", "ASCII", ["UTF-8", "UTF-16"]));
11
12$str = "\xff";
13var_dump(mb_convert_variables("ASCII", ["UTF-8", "UTF-16"], $str));
14var_dump(bin2hex($str));
15
16?>
17--EXPECTF--
18Warning: mb_convert_encoding(): Unable to detect character encoding in %s on line %d
19bool(false)
20
21Warning: mb_convert_variables(): Unable to detect encoding in %s on line %d
22bool(false)
23string(2) "ff"
24