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