mirror of
https://github.com/php/php-src.git
synced 2026-04-28 18:53:33 +02:00
cc56225339
Set deprecate Oniguruma(mbregex) Thank you for Oniguruma. Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>
37 lines
983 B
PHP
37 lines
983 B
PHP
--TEST--
|
|
Test oniguruma stack limit
|
|
--EXTENSIONS--
|
|
mbstring
|
|
--SKIPIF--
|
|
<?php
|
|
if (!function_exists('mb_ereg')) die('skip mb_ereg not available');
|
|
if (@version_compare(MB_ONIGURUMA_VERSION, '6.9.3') < 0) {
|
|
die('skip requires Oniguruma 6.9.3');
|
|
}
|
|
?>
|
|
--FILE--
|
|
<?php
|
|
$s = str_repeat(' ', 30000);
|
|
|
|
ini_set('mbstring.regex_stack_limit', 10000);
|
|
var_dump(mb_ereg('\\s+$', $s));
|
|
|
|
ini_set('mbstring.regex_stack_limit', 30000);
|
|
var_dump(mb_ereg('\\s+$', $s));
|
|
|
|
ini_set('mbstring.regex_stack_limit', 30001);
|
|
var_dump(mb_ereg('\\s+$', $s));
|
|
|
|
echo 'OK';
|
|
?>
|
|
--EXPECTF--
|
|
Deprecated: Function mb_ereg() is deprecated since 8.6, because the underlying library is no longer maintained in %s on line %d
|
|
bool(false)
|
|
|
|
Deprecated: Function mb_ereg() is deprecated since 8.6, because the underlying library is no longer maintained in %s on line %d
|
|
bool(false)
|
|
|
|
Deprecated: Function mb_ereg() is deprecated since 8.6, because the underlying library is no longer maintained in %s on line %d
|
|
bool(true)
|
|
OK
|