php-src/ext/pcre/tests/errors04.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

27 lines
574 B
PHP

--TEST--
Test preg_match_all() function : error conditions - Backtracking limit
--SKIPIF--
<?php
if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
die("skip no support for \p support PCRE library");
}
?>
--INI--
pcre.backtrack_limit=2
pcre.jit=0
--FILE--
<?php
var_dump(preg_match_all('/.*\p{N}/', '0123456789', $dummy));
var_dump(preg_last_error_msg() === 'Backtrack limit exhausted');
var_dump(preg_match_all('/\p{Nd}/', '0123456789', $dummy));
var_dump(preg_last_error_msg() === 'No error');
?>
--EXPECT--
bool(false)
bool(true)
int(10)
bool(true)