xref: /php-src/sapi/cli/tests/argv_mb.phpt (revision dcc3255b)
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_ESCAPED');
11
12$argv_fl = __DIR__ . DIRECTORY_SEPARATOR . "argv_test.php";
13$argv_fl_escaped = escapeshellarg($argv_fl);
14file_put_contents($argv_fl, "<?php var_dump(\$argv); ?>");
15
16var_dump(`$php -n $argv_fl_escaped 多字节字符串 マルチバイト文字列 многобайтоваястрока flerbytesträng`);
17
18@unlink($argv_fl);
19
20?>
21--EXPECTF--
22string(%d) "array(%d) {
23  [0]=>
24  string(%d) "%sargv_test.php"
25  [1]=>
26  string(18) "多字节字符串"
27  [2]=>
28  string(27) "マルチバイト文字列"
29  [3]=>
30  string(38) "многобайтоваястрока"
31  [4]=>
32  string(15) "flerbytesträng"
33}
34"
35