Process.env

Set the process' environment variables from the associative array received by the method.

This also clears the copyEnv flag.

  1. string[string] env()
  2. string[string] env(string[string] env)
    class Process
    string[string]
    env
    (
    string[string] env
    )

Parameters

env string[string]

associative array of strings containing the environment variables for the process. The variable name should be the key used for each entry.

Return Value

Type: string[string]

the env set.

Examples

string[string] env;

env["MYVAR1"] = "first";
env["MYVAR2"] = "second";

p.env = env;

Meta