mirror of
https://github.com/php/php-src.git
synced 2024-09-22 02:17:32 +00:00
c5401854fc
This should fix most of the remaining issues with tabs and spaces being mixed in tests.
27 lines
574 B
PHP
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)
|