xref: /PHP-8.0/ext/mbstring/tests/retry_limit.phpt (revision 5582490b)
1--TEST--
2Oniguruma retry limit
3--SKIPIF--
4<?php
5extension_loaded('mbstring') or die('skip mbstring not available');
6if (!function_exists('mb_ereg')) die('skip mb_ereg not available');
7if (version_compare(MB_ONIGURUMA_VERSION, '6.9.3') < 0) {
8    die('skip requires Oniguruma >= 6.9.3');
9}
10?>
11--FILE--
12<?php
13
14$regex = 'A(B|C+)+D|AC+X';
15$str = 'ACCCCCCCCCCCCCCCCCCCX';
16var_dump(mb_ereg($regex, $str));
17ini_set('mbstring.regex_retry_limit', '100000');
18var_dump(mb_ereg($regex, $str));
19
20?>
21--EXPECT--
22bool(true)
23bool(false)
24