3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php print_r($_ENV); var_dump(PHP_OS); system('-ls');
based on MkBqM
Output for 4.3.0, 5.4.39 - 5.4.41, 5.4.43 - 7.1.0
Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIN] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [USERNAME] => nobody [HOME] => / ) string(5) "Linux"
Output for 5.4.42
Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIN] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [USERNAME] => nobody [HOME] => / ) string(5) "Linux" Warning: system(): Unable to fork [-ls] in /in/HPeEs on line 4
Output for 4.3.1 - 5.4.38
Array ( [TERM] => xterm [PATH] => /usr/bin:/bin [LANG] => C [SHELL] => /bin/sh [MAIN] => /var/mail/nobody [LOGNAME] => nobody [USER] => nobody [USERNAME] => nobody [HOME] => / ) string(5) "Linux" sh: 0: -c requires an argument