Download src/php/php-src/ext/iconv/tests/bug76249.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 606 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/iconv/tests/bug76249.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/iconv/tests/bug76249.phpt
-
curl -L -o bug76249.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/iconv/tests/bug76249.phpt
606 Bytes
| --TEST-- | |
| Bug #76249 (stream filter convert.iconv leads to infinite loop on invalid sequence) | |
| --EXTENSIONS-- | |
| iconv | |
| --FILE-- | |
| $fh = fopen('php://memory', 'rw'); | |
| fwrite($fh, "abc"); | |
| rewind($fh); | |
| if (false === @stream_filter_append($fh, 'convert.iconv.ucs-2/utf8//IGNORE', STREAM_FILTER_READ, [])) { | |
| stream_filter_append($fh, 'convert.iconv.ucs-2/utf-8//IGNORE', STREAM_FILTER_READ, []); | |
| } | |
| var_dump(stream_get_contents($fh)); | |
| DONE | |
| --EXPECTF-- | |
| Warning: stream_get_contents(): iconv stream filter ("ucs-2"=>"utf%A8//IGNORE"): invalid multibyte sequence in %sbug76249.php on line %d | |
| string(0) "" | |
| DONE | |