Download src/php/php-src/sapi/cli/tests/argv_mb.phpt from meddyrat/dis-bench: direct link, hf CLI and curl.
- Browser
- Download file 758 Bytes
-
https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cli/tests/argv_mb.phpt
- Command line
-
hf download hf://datasets/meddyrat/dis-bench/src/php/php-src/sapi/cli/tests/argv_mb.phpt
-
curl -L -o argv_mb.phpt https://huggingface.co/datasets/meddyrat/dis-bench/resolve/main/src/php/php-src/sapi/cli/tests/argv_mb.phpt
758 Bytes
| --TEST-- | |
| Test basic argv multibyte API integration | |
| --SKIPIF-- | |
| include "skipif.inc"; | |
| --FILE-- | |
| $php = getenv('TEST_PHP_EXECUTABLE_ESCAPED'); | |
| $argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php"; | |
| $argv_fl_escaped = escapeshellarg($argv_fl); | |
| file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>"); | |
| var_dump(`$php -n $argv_fl_escaped 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`); | |
| @unlink($argv_fl); | |
| --EXPECTF-- | |
| string(%d) "array(%d) { | |
| [0]=> | |
| string(%d) "%sargv_test.php" | |
| [1]=> | |
| string(18) "多字节字符串" | |
| [2]=> | |
| string(27) "マルチバイト文字列" | |
| [3]=> | |
| string(38) "многобайтоваястрока" | |
| [4]=> | |
| string(15) "flerbytesträng" | |
| } | |
| " | |