summaryrefslogtreecommitdiff
path: root/ext/mbstring/tests/bug49536.phpt
blob: 40328f79f038a8abb754679e2ecedf31631e0b8a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--TEST--
Bug #49536 (mb_detect_encoding() returns incorrect results when strict_mode is turned on)
--SKIPIF--
<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?>
--FILE--
<?php
// non-strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", false));
// strict mode
var_dump(mb_detect_encoding("A\x81", "SJIS", true));
// non-strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", false));
// strict mode
var_dump(mb_detect_encoding("\xc0\x00", "UTF-8", true));
?>
--EXPECT--
string(4) "SJIS"
bool(false)
bool(false)
bool(false)