The other problem with the code from av01 at bugfix dot cc is that
the behaviour is as per the comments here, not there:
<?php
putenv('MYVAR='); // set MYVAR to an empty value. It is in the environment
putenv('MYVAR'); // unset MYVAR. It is removed from the environment
?>