1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Files
archived-php-src/ext/mbstring/tests/bug69151.phpt
2019-03-30 18:28:33 +01:00

25 lines
538 B
PHP

--TEST--
Bug #69151 (mb_ereg should reject ill-formed byte sequence)
--SKIPIF--
<?php
extension_loaded('mbstring') or die('skip mbstring not available');
if (!function_exists('mb_ereg')) die('skip mbregex support not available');
?>
--FILE--
<?php
$str = "\x80";
var_dump(
false === mb_eregi('.', $str, $matches),
[] === $matches,
NULL === mb_ereg_replace('.', "\\0", $str),
false === mb_ereg_search_init("\x80", '.'),
false === mb_ereg_search()
);
?>
--EXPECT--
bool(true)
bool(true)
bool(true)
bool(true)
bool(true)