Download src/php/php-src/ext/pcre/tests/bug41148.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 1.57 kB
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41148.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/pcre/tests/bug41148.phpt
-
curl -L -o bug41148.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/pcre/tests/bug41148.phpt
1.57 kB
| --TEST-- | |
| Bug #41148 (pcre 7.0 regression) | |
| --FILE-- | |
| <?php | |
| $letexte="<br><br>"; | |
| $ligne_horizontale = $puce = $debut_intertitre = $fin_intertitre = ''; | |
| $cherche1 = array( | |
| /* 0 */ "/\n(----+|____+)/S", | |
| /* 1 */ "/\n-- */S", | |
| /* 2 */ "/\n- */S", | |
| /* 3 */ "/\n_ +/S", | |
| /* 4 */ "/(^|[^{])[{][{][{]/S", | |
| /* 5 */ "/[}][}][}]($|[^}])/S", | |
| /* 6 */ "/(( *)\n){2,}(<br[[:space:]]*\/?".">)?/S", | |
| /* 7 */ "/[{][{]/S", | |
| /* 8 */ "/[}][}]/S", | |
| /* 9 */ "/[{]/S", | |
| /* 10 */ "/[}]/S", | |
| /* 11 */ "/(<br[[:space:]]*\/?".">){2,}/S", | |
| /* 12 */ "/<p>([\n]*(<br[[:space:]]*\/?".">)*)*/S", | |
| /* 13 */ "/<quote>/S", | |
| /* 14 */ "/<\/quote>/S" | |
| ); | |
| $remplace1 = array( | |
| /* 0 */ "\n\n$ligne_horizontale\n\n", | |
| /* 1 */ "\n<br />— ", | |
| /* 2 */ "\n<br />$puce ", | |
| /* 3 */ "\n<br />", | |
| /* 4 */ "\$1\n\n$debut_intertitre", | |
| /* 5 */ "$fin_intertitre\n\n\$1", | |
| /* 6 */ "<p>", | |
| /* 7 */ "<strong class=\"spip\">", | |
| /* 8 */ "</strong>", | |
| /* 9 */ "<i class=\"spip\">", | |
| /* 10 */ "</i>", | |
| /* 11 */ "<p>", | |
| /* 12 */ "<p>", | |
| /* 13 */ "<blockquote class=\"spip\"><p>", | |
| /* 14 */ "</blockquote><p>" | |
| ); | |
| $letexte = preg_replace($cherche1, $remplace1, $letexte); | |
| $letexte = preg_replace("@^ <br />@S", "", $letexte); | |
| print $letexte; | |
| ?> | |
| --EXPECT-- | |
| <p> | |