Download src/php/php-src/ext/pcre/tests/bug40909.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 600 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug40909.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug40909.phpt
-
curl -L -o bug40909.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug40909.phpt
600 Bytes
| --TEST-- | |
| Bug #40909 (pcre 7.0 regression) | |
| --FILE-- | |
| $pattern = | |
| "/\s([\w_\.\/]+)(?:=([\'\"]?(?:[\w\d\s\?=\(\)\.,'_#\/\\:;&-]|(?:\\\\\"|\\\')?)+[\'\"]?))?/"; | |
| $context = "<simpletag an_attribute=\"simpleValueInside\">"; | |
| $match = array(); | |
| if ($result =preg_match_all($pattern, $context, $match)) | |
| { | |
| var_dump($result); | |
| var_dump($match); | |
| } | |
| --EXPECT-- | |
| int(1) | |
| array(3) { | |
| [0]=> | |
| array(1) { | |
| [0]=> | |
| string(33) " an_attribute="simpleValueInside"" | |
| } | |
| [1]=> | |
| array(1) { | |
| [0]=> | |
| string(12) "an_attribute" | |
| } | |
| [2]=> | |
| array(1) { | |
| [0]=> | |
| string(19) ""simpleValueInside"" | |
| } | |
| } | |