mirror of
https://github.com/php/php-src.git
synced 2024-10-02 15:26:06 +00:00
c30bde0ef5
just for the test to check the failure.
25 lines
670 B
PHP
25 lines
670 B
PHP
--TEST--
|
|
preg_replace() with array of failing regular expressions
|
|
--INI--
|
|
pcre.backtrack_limit=100000
|
|
--FILE--
|
|
<?php
|
|
|
|
$text = '[CODE]<td align="$stylevar[right]">[/CODE]';
|
|
$result = preg_replace(array('#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU', '#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU'), '', $text);
|
|
var_dump($text);
|
|
var_dump($result);
|
|
|
|
$result = preg_replace('#\[(right)\](((?R)|[^[]+?|\[)*)\[/\\1\]#siU', '', $text);
|
|
var_dump($text);
|
|
var_dump($result);
|
|
|
|
echo "Done\n";
|
|
?>
|
|
--EXPECTF--
|
|
string(58) "[CODE]<td align="$stylevar[right]">[/CODE]"
|
|
NULL
|
|
string(58) "[CODE]<td align="$stylevar[right]">[/CODE]"
|
|
NULL
|
|
Done
|