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