The story is like this:
After running a JUnit test campaign, I run a php script to get the variables $testsOK and $testsFailed.
In the same php script I have to add to environment variables "OK" and "FAILED" the numbers that I obtained just before in the same script. I used putenv, $_ENV["OK"]= ... even apache_setenv("OK",$testsOK), which of course does not work since I do not have a webserver, I only use PHP CLI.
I will have to use these environment variables "OK" and "FAILED" in windows batch command after the script was run.
On the putenv page on php.net (http://php.net/manual/en/function.putenv.php) someone says that: "putenv/getenv, $_ENV, and phpinfo(INFO_ENVIRONMENT) are three completely distinct environment stores. doing putenv("x=y") does not affect $_ENV; but also doing $_ENV["x"]="y" likewise does not affect getenv("x"). And neither affect what is returned in phpinfo()."
Therefore, none of these methods will help me. My question is: should I drop this method and try with another language? :-) or is there a way that I'm missing.
I would very much appreciate your help. Anca