xref: /PHP-8.0/ext/pcre/tests/errors05.phpt (revision c5401854)
1--TEST--
2Test preg_match() function : error conditions - jit stacklimit exhausted
3--SKIPIF--
4<?php
5if (ini_get('pcre.jit') === false) {
6    die("skip no jit built");
7}
8?>
9--INI--
10pcre.jit=1
11--FILE--
12<?php
13var_dump(preg_match('/^(foo)+$/', str_repeat('foo', 1024*8192)));
14var_dump(preg_last_error_msg() === 'JIT stack limit exhausted');
15?>
16--EXPECT--
17bool(false)
18bool(true)
19