xref: /PHP-7.2/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 mbstring extension not available');
6if (!function_exists('mb_ereg_search_init')) die('skip mb_ereg_search_init() 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