3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php var_dump($_ENV); setenv("test", "foobar"); var_dump($_ENV);
Output for 7.0.0 - 7.2.0
array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } Fatal error: Uncaught Error: Call to undefined function setenv() in /in/49ASQ:4 Stack trace: #0 {main} thrown in /in/49ASQ on line 4
Process exited with code 255.
Output for 5.3.18 - 5.6.28
array(9) { ["TERM"]=> string(5) "xterm" ["PATH"]=> string(13) "/usr/bin:/bin" ["LANG"]=> string(1) "C" ["SHELL"]=> string(7) "/bin/sh" ["MAIN"]=> string(16) "/var/mail/nobody" ["LOGNAME"]=> string(6) "nobody" ["USER"]=> string(6) "nobody" ["USERNAME"]=> string(6) "nobody" ["HOME"]=> string(1) "/" } Fatal error: Call to undefined function setenv() in /in/49ASQ on line 4
Process exited with code 255.