Title says it. I want to use this with proc_open, to append some variables to the current environment.

$current_env = get_all_env_vars_magically();
$env = array_merge($current_env, $new_vars);
$ph = proc_open($command, array(1 => array('pipe', 'w')), 
    $pipes, dirname(__FILE__), $env);

Edit: $_ENV is empty/not populated by default. $_SERVER contains so much more than env vars.

Edit
Report