Annotation of embedaddon/php/ext/mbstring/tests/bug49536.phpt, revision 1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>