Download src/php/php-src/ext/pcre/tests/bug72685.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 460 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug72685.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug72685.phpt
-
curl -L -o bug72685.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug72685.phpt
460 Bytes
| --TEST-- | |
| Bug #72685: Same string is UTF-8 validated repeatedly | |
| --SKIPIF-- | |
| if (getenv('SKIP_PERF_SENSITIVE')) die("skip performance sensitive test"); | |
| --FILE-- | |
| $input_size = 64 * 1024; | |
| $str = str_repeat('a', $input_size); | |
| $start = microtime(true); | |
| $pos = 0; | |
| while (preg_match('/\G\w/u', $str, $m, 0, $pos)) ++$pos; | |
| $end = microtime(true); | |
| var_dump(($end - $start) < 0.5); // large margin, more like 0.05 in debug build | |
| --EXPECT-- | |
| bool(true) | |