xref: /PHP-8.1/ext/mbstring/tests/bug72694.phpt (revision 74859783)
1--TEST--
2Bug #72694 (mb_ereg_search_setpos does not accept a string's last position)
3--EXTENSIONS--
4mbstring
5--SKIPIF--
6<?php
7if (!function_exists('mb_ereg')) die('skip mbregex support not available');
8?>
9--FILE--
10<?php
11mb_ereg_search_init('foo');
12
13var_dump(mb_ereg_search_setpos(3));
14var_dump(mb_ereg_search_getpos());
15
16var_dump(mb_ereg_search('\Z'));
17var_dump(mb_ereg_search_getpos());
18?>
19--EXPECT--
20bool(true)
21int(3)
22bool(true)
23int(3)
24