Windows compatible proc_open(). Works around bug in PHP, and also deals with *nix-like ENV_VAR=blah cmd environment variable prefixes.
WP_CLI\Utils\proc_open_compat( $cmd, $descriptorspec, $pipes, $cwd = null, $env = null, $other_options = null )
$cmd (string) Command to execute.
string> (array<int,) $descriptorspec Indexed array of descriptor numbers and their values.
string> (array<int,) &$pipes Indexed array of file pointers that correspond to PHP's end of any pipes that are created.
$cwd (string) Initial working directory for the command.
string> (array<string,) $env Array of environment variables.
$other_options (array<string>) Array of additional options (Windows only).
@return (resource) stripped of any environment variable settings.
string> (array<int,) $descriptorspec Indexed array of descriptor numbers and their values.
string> (array<int,) &$pipes Indexed array of file pointers that correspond to PHP's end of any pipes that are created.
$cwd (string) Initial working directory for the command.
string> (array<string,) $env Array of environment variables.
$other_options (array<string>) Array of additional options (Windows only).
@return (resource) stripped of any environment variable settings.
Internal API documentation is generated from the WP-CLI codebase on every release. To suggest improvements, please submit a pull request.
- WP_CLI\Utils\write_csv() - Write data as CSV to a given file.
- WP_CLI\Utils\http_request() - Make a HTTP request to a remote URL.
- WP_CLI\Utils\get_named_sem_ver() - Compare two version strings to get the named semantic version.
- WP_CLI\Utils\parse_ssh_url() - Parse a SSH url for its host, port, and path.
- WP_CLI\Utils\basename() - Locale-independent version of basename()
- WP_CLI\Utils\isPiped() - Checks whether the output of the current script is a TTY or a pipe / redirect
- WP_CLI\Utils\esc_like() - First half of escaping for LIKE special characters % and _ before preparing for MySQL.