xref: /php-src/ext/mbstring/tests/bug69151.phpt (revision 39131219)
1--TEST--
2Bug #69151 (mb_ereg should reject ill-formed byte sequence)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mbregex support not available');
8?>
9--FILE--
10<?php
11$str = "\x80";
12
13var_dump(false === mb_eregi('.', $str, $matches));
14var_dump([] === $matches);
15
16var_dump(NULL === mb_ereg_replace('.', "\\0", $str));
17
18var_dump(false === mb_ereg_search_init("\x80", '.'));
19var_dump(false === mb_ereg_search());
20?>
21--EXPECT--
22bool(true)
23bool(true)
24bool(true)
25bool(true)
26bool(true)
27