1--TEST-- 2proc_open with 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_mb0.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 NULL, 26 NULL, 27 array("bypass_shell" => true) 28 ); 29 30$out = ""; 31 32while (!feof($pipes[1])) { 33 $out .= fread($pipes[1], 1024); 34} 35 36proc_close($p); 37 38echo $out; 39 40?> 41--EXPECTF-- 42array(4) { 43 [0]=> 44 string(%d) "%sproc_only_mb0.php" 45 [1]=> 46 string(36) "テストマルチバイト・パス" 47 [2]=> 48 string(6) "füße" 49 [3]=> 50 string(14) "карамба" 51} 52