Download src/php/php-src/ext/pcre/tests/bug41638.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41638.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug41638.phpt
-
curl -L -o bug41638.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41638.phpt
1.2 kB
| --TEST-- | |
| Bug #41638 (pcre 7.0 regression) | |
| --FILE-- | |
| $str = "repeater id='loopt' dataSrc=subject columns=2"; | |
| preg_match_all("/(['\"])((.*(\\\\\\1)*)*)\\1/sU",$str,$str_instead); | |
| print_r($str_instead); | |
| // these two are from Magnus Holmgren (extracted from a pcre-dev mailing list post) | |
| preg_match_all("/(['\"])((?:\\\\\\1|.)*)\\1/sU", $str, $str_instead); | |
| print_r($str_instead); | |
| preg_match_all("/(['\"])(.*)(?<!\\\\)\\1/sU", $str, $str_instead); | |
| print_r($str_instead); | |
| --EXPECT-- | |
| Array | |
| ( | |
| [0] => Array | |
| ( | |
| [0] => 'loopt' | |
| ) | |
| [1] => Array | |
| ( | |
| [0] => ' | |
| ) | |
| [2] => Array | |
| ( | |
| [0] => loopt | |
| ) | |
| [3] => Array | |
| ( | |
| [0] => t | |
| ) | |
| [4] => Array | |
| ( | |
| [0] => | |
| ) | |
| ) | |
| Array | |
| ( | |
| [0] => Array | |
| ( | |
| [0] => 'loopt' | |
| ) | |
| [1] => Array | |
| ( | |
| [0] => ' | |
| ) | |
| [2] => Array | |
| ( | |
| [0] => loopt | |
| ) | |
| ) | |
| Array | |
| ( | |
| [0] => Array | |
| ( | |
| [0] => 'loopt' | |
| ) | |
| [1] => Array | |
| ( | |
| [0] => ' | |
| ) | |
| [2] => Array | |
| ( | |
| [0] => loopt | |
| ) | |
| ) | |