Download src/php/php-src/ext/pcre/tests/006.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 679 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/006.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/006.phpt
-
curl -L -o 006.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/006.phpt
679 Bytes
| --TEST-- | |
| preg_replace() with array of failing regular expressions | |
| --INI-- | |
| pcre.jit=0 | |
| pcre.backtrack_limit=100000 | |
| --FILE-- | |
| $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"; | |
| --EXPECT-- | |
| string(58) "[CODE]<td align="$stylevar[right]">[/CODE]" | |
| NULL | |
| string(58) "[CODE]<td align="$stylevar[right]">[/CODE]" | |
| NULL | |
| Done | |