Download src/php/php-src/ext/gettext/tests/gettext_basic-enus.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gettext/tests/gettext_basic-enus.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/ext/gettext/tests/gettext_basic-enus.phpt
-
curl -L -o gettext_basic-enus.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/ext/gettext/tests/gettext_basic-enus.phpt
580 Bytes
| --TEST-- | |
| Gettext basic test with en_US locale that should be on nearly every system | |
| --EXTENSIONS-- | |
| gettext | |
| --SKIPIF-- | |
| if (!setlocale(LC_ALL, 'en_US.UTF-8')) { | |
| die("skip en_US.UTF-8 locale not supported."); | |
| } | |
| --FILE-- | |
| chdir(__DIR__); | |
| putenv('LC_ALL=en_US.UTF-8'); | |
| setlocale(LC_ALL, 'en_US.UTF-8'); | |
| bindtextdomain ("messages", "./locale"); | |
| textdomain ("messages"); | |
| echo gettext("Basic test"), "\n"; | |
| echo _("Basic test"), "\n"; | |
| --EXPECT-- | |
| A basic test | |
| A basic test | |
| --CREDITS-- | |
| Christian Weiske, cweiske@php.net | |
| PHP Testfest Berlin 2009-05-09 | |