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