3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php var_dump($_ENV['foo']); putenv('foo=bar'); var_dump($_ENV['foo']); var_dump(getenv('foo'));
Output for 5.3.0 - 7.1.0
Notice: Undefined index: foo in /in/amp0t on line 2 NULL Notice: Undefined index: foo in /in/amp0t on line 4 NULL string(3) "bar"
Output for 4.3.0 - 5.2.17
Notice: Undefined index: foo in /in/amp0t on line 2 NULL Notice: Undefined index: foo in /in/amp0t on line 4 NULL string(3) "bar"