WP_CLI\Utils

proc_open_compat()WP-CLI 1.0

Windows compatible proc_open(). Works around bug in PHP, and also deals with *nix-like ENV_VAR=blah cmd environment variable prefixes.

Хуков нет.

Возвращает

resource. Command stripped of any environment variable settings.

Использование

proc_open_compat( $cmd, $descriptorspec, $pipes, $cwd, $env, $other_options );
$cmd(строка) (обязательный)
Command to execute.
$descriptorspec(обязательный)
.
$pipes(обязательный) (передается по ссылке — &)
.
$cwd(строка)
Initial working directory for the command.
По умолчанию: null
$env
.
По умолчанию: null
$other_options(array)
Array of additional options (Windows only).
По умолчанию: null

Код proc_open_compat() WP-CLI 2.13.0-alpha

function proc_open_compat( $cmd, $descriptorspec, &$pipes, $cwd = null, $env = null, $other_options = null ) {
	if ( is_windows() ) {
		$cmd = _proc_open_compat_win_env( $cmd, $env );
	}
	return proc_open( $cmd, $descriptorspec, $pipes, $cwd, $env, $other_options );
}