xref: /PHP-8.2/sapi/cli/tests/argv_mb.phpt (revision a555cc0b)
1--TEST--
2Test basic argv multibyte API integration
3--SKIPIF--
4<?php
5include "skipif.inc";
6?>
7--FILE--
8<?php
9
10$php = getenv('TEST_PHP_EXECUTABLE');
11
12$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
13file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>");
14
15var_dump(`$php -n $argv_fl 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`);
16
17@unlink($argv_fl);
18
19?>
20--EXPECTF--
21string(%d) "array(%d) {
22  [0]=>
23  string(%d) "%sargv_test.php"
24  [1]=>
25  string(18) "多字节字符串"
26  [2]=>
27  string(27) "マルチバイト文字列"
28  [3]=>
29  string(38) "многобайтоваястрока"
30  [4]=>
31  string(15) "flerbytesträng"
32}
33"
34