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