blob: 5dc7913db2650beb22e86400ec8ff80ff5ad1915 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
--TEST--
Bug #77193 Infinite loop in preg_replace_callback
--SKIPIF--
<?php
if (!extension_loaded("filter")) {
die("skip need filter extension");
}
?>
--FILE--
<?php
$text = '{CCM:CID_2}';
echo '1';
$mt = array();
preg_replace_callback(
'/([0-9]+)/i',
function ($matches) {
echo $matches[1];
filter_var('http', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => '/^http$/i']]);
},
$text
);
echo '3', "\n";
?>
===DONE===
--EXPECT--
123
===DONE===
|