1--TEST--
2proc_open without bypass_shell subprocess parameter passing
3--SKIPIF--
4<?php
5if (!function_exists("proc_open")) echo "skip proc_open() is not available";
6?>
7--FILE--
8<?php
9
10$php = PHP_BINARY;
11
12$f = __DIR__ . DIRECTORY_SEPARATOR . "proc_only_mb1.php";
13file_put_contents($f,'<?php var_dump($argv); ?>');
14
15$ds = array(
16        0 => array("pipe", "r"),
17        1 => array("pipe", "w"),
18        2 => array("pipe", "w")
19        );
20
21$p = proc_open(
22        "$php -n $f テストマルチバイト・パス füße карамба",
23        $ds,
24        $pipes
25        );
26
27$out = "";
28
29while (!feof($pipes[1])) {
30    $out .= fread($pipes[1], 1024);
31}
32
33proc_close($p);
34
35echo $out;
36
37?>
38--EXPECTF--
39array(4) {
40  [0]=>
41  string(%d) "%sproc_only_mb1.php"
42  [1]=>
43  string(36) "テストマルチバイト・パス"
44  [2]=>
45  string(6) "füße"
46  [3]=>
47  string(14) "карамба"
48}
49