Download src/php/php-src/ext/fileinfo/tests/bug74170.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 624 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/fileinfo/tests/bug74170.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/fileinfo/tests/bug74170.phpt
-
curl -L -o bug74170.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/fileinfo/tests/bug74170.phpt
624 Bytes
| --TEST-- | |
| Bug #74170 locale information change after mime_content_type | |
| --EXTENSIONS-- | |
| fileinfo | |
| intl | |
| --SKIPIF-- | |
| if (setlocale(LC_ALL, 'invalid') === 'invalid') { die('skip setlocale() is broken /w musl'); } | |
| if (setlocale(LC_CTYPE, 'ru_RU.koi8r') === false) | |
| die('skip ru_RU.koi8r locale is not available'); | |
| --FILE-- | |
| var_dump(setlocale(LC_CTYPE, 'ru_RU.koi8r')); | |
| var_dump(nl_langinfo(CODESET)); | |
| var_dump(mime_content_type(__DIR__ . '/resources/test.ppt')); | |
| var_dump(nl_langinfo(CODESET)); | |
| --EXPECT-- | |
| string(11) "ru_RU.koi8r" | |
| string(6) "KOI8-R" | |
| string(29) "application/vnd.ms-powerpoint" | |
| string(6) "KOI8-R" | |