php-src/ext/pcre/tests/recursion_limit.phpt
Nikita Popov c5401854fc Run tidy
This should fix most of the remaining issues with tabs and spaces
being mixed in tests.
2020-09-18 14:28:32 +02:00

26 lines
546 B
PHP

--TEST--
PCRE Recursion limit
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
die("skip no support for \p support PCRE library");
}
?>
--INI--
pcre.jit=0
pcre.recursion_limit=2
--FILE--
<?php
var_dump(preg_match_all('/\p{Ll}(\p{L}((\p{Ll}\p{Ll})))/', 'aeiou', $dummy));
var_dump(preg_last_error() === PREG_RECURSION_LIMIT_ERROR);
var_dump(preg_match_all('/\p{Ll}\p{L}\p{Ll}\p{Ll}/', 'aeiou', $dummy));
var_dump(preg_last_error() === PREG_NO_ERROR);
?>
--EXPECT--
bool(false)
bool(true)
int(1)
bool(true)