3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php if ( file_exists("/etc/hosts") ){ echo "This is a linux system\n"; if(is_callable("system")){ echo "System is available\n"; system("uname -a"); }elseif(is_callable("shell_exec")){ echo "Shell_exec is available\n"; }elseif(is_callable("exec")){ echo "exec is available\n"; }else{ echo "No dice:(";} }else{ echo "blah!\n\n"; } ?>
based on mtjD3
Output for 4.3.0, 5.4.42 - 7.2.0
This is a linux system System is available
Output for 4.3.1 - 5.4.41
This is a linux system System is available sh: 1: uname: not found