3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $cmds = array("alias", "apt-get", "aptitude", "aspell", "awk", "basename", "bc", "bg", "break", "builtin", "bzip2", "cal", "case", "cat", "cd", "cfdisk", "chgrp", "chmod", "chown", "chroot", "chkconfig", "cksum", "cmp", "comm", "command", "continue", "cp", "cron", "crontab", "csplit", "cut", "date", "dc", "dd", "ddrescue", "declare", "df", "diff", "diff3", "dig", "dir", "dircolors", "dirname", "dirs", "dmesg", "du", "echo", "egrep", "eject", "enable", "env", "eval", "exec", "exit", "expect", "expand", "export", "expr", "false", "fdformat", "fdisk", "fg", "fgrep", "find", "fmt", "fold", "for", "fsck", "function", "fuser", "gawk", "getopts", "grep", "groupadd", "groupdel", "groupmod", "groups", "gzip", "hash", "head", "history", "hostname", "iconv", "id", "if", "ifconfig", "ifdown", "ifup", "import", "install", "jobs", "join", "kill", "killall", "less", "let", "ln", "local", "locate", "logname", "logout", "look", "lpc", "lpr", "lprm", "ls", "lsof", "man", "mkdir", "mkfifo", "mknod", "more", "mount", "mtools", "mtr", "mv", "mmv", "nice", "nl", "nohup", "notify-send", "nslookup", "open", "op", "passwd", "paste", "ping", "pkill", "popd", "pr", "printf", "ps", "pushd", "pwd", "quota", "quotacheck", "quotactl", "ram", "rcp", "read", "readonly", "rename", "return", "rev", "rm", "rmdir", "rsync", "screen", "scp", "sdiff", "sed", "select", "seq", "set", "shift", "shopt", "shutdown", "sleep", "slocate", "sort", "source", "split", "ssh", "su", "sudo", "sum", "suspend", "symlink", "sync", "tail", "tar", "tee", "test", "time", "times", "touch", "top", "traceroute", "tr", "true", "tsort", "tty", "type", "ulimit", "umask", "unalias", "uname", "unexpand", "uniq", "units", "unset", "unshar", "until", "useradd", "userdel", "usermod", "users", "uuencode", "uudecode", "vi", "vmstat", "wait", "watch", "wc", "whereis", "which", "while", "who", "whoami", "write", "xargs", "xdg-open", "yes", ".", "!!", "###"); foreach($cmds as $cmd) { echo shell_exec($cmd); }
Output for 5.3.0 - 5.6.28, 7.0.0 - 7.1.0
Output for hhvm-3.10.0 - 3.13.2
Failed to exec: `alias' Failed to exec: `apt-get' Failed to exec: `aptitude' Failed to exec: `aspell' Failed to exec: `awk' Failed to exec: `basename' Failed to exec: `bc' Failed to exec: `bg' Failed to exec: `break' Failed to exec: `builtin' Failed to exec: `bzip2' Failed to exec: `cal' Failed to exec: `case' Failed to exec: `cat' Failed to exec: `cd' Failed to exec: `cfdisk' Failed to exec: `chgrp' Failed to exec: `chmod' Failed to exec: `chown' Failed to exec: `chroot' Failed to exec: `chkconfig' Failed to exec: `cksum' Failed to exec: `cmp' Failed to exec: `comm' Failed to exec: `command' Failed to exec: `continue' Failed to exec: `cp' Failed to exec: `cron' Failed to exec: `crontab' Failed to exec: `csplit' Failed to exec: `cut' Failed to exec: `date' Failed to exec: `dc' Failed to exec: `dd' Failed to exec: `ddrescue' Failed to exec: `declare' Failed to exec: `df' Failed to exec: `diff' Failed to exec: `diff3' Failed to exec: `dig' Failed to exec: `dir' Failed to exec: `dircolors' Failed to exec: `dirname' Failed to exec: `dirs' Failed to exec: `dmesg' Failed to exec: `du' Failed to exec: `echo' Failed to exec: `egrep' Failed to exec: `eject' Failed to exec: `enable' Failed to exec: `env' Failed to exec: `eval' Failed to exec: `exec' Failed to exec: `exit' Failed to exec: `expect' Failed to exec: `expand' Failed to exec: `export' Failed to exec: `expr' Failed to exec: `false' Failed to exec: `fdformat' Failed to exec: `fdisk' Failed to exec: `fg' Failed to exec: `fgrep' Failed to exec: `find' Failed to exec: `fmt' Failed to exec: `fold' Failed to exec: `for' Failed to exec: `fsck' Failed to exec: `function' Failed to exec: `fuser' Failed to exec: `gawk' Failed to exec: `getopts' Failed to exec: `grep' Failed to exec: `groupadd' Failed to exec: `groupdel' Failed to exec: `groupmod' Failed to exec: `groups' Failed to exec: `gzip' Failed to exec: `hash' Failed to exec: `head' Failed to exec: `history' Failed to exec: `hostname' Failed to exec: `iconv' Failed to exec: `id' Failed to exec: `if' Failed to exec: `ifconfig' Failed to exec: `ifdown' Failed to exec: `ifup' Failed to exec: `import' Failed to exec: `install' Failed to exec: `jobs' Failed to exec: `join' Failed to exec: `kill' Failed to exec: `killall' Failed to exec: `less' Failed to exec: `let' Failed to exec: `ln' Failed to exec: `local' Failed to exec: `locate' Failed to exec: `logname' Failed to exec: `logout' Failed to exec: `look' Failed to exec: `lpc' Failed to exec: `lpr' Failed to exec: `lprm' Failed to exec: `ls' Failed to exec: `lsof' Failed to exec: `man' Failed to exec: `mkdir' Failed to exec: `mkfifo' Failed to exec: `mknod' Failed to exec: `more' Failed to exec: `mount' Failed to exec: `mtools' Failed to exec: `mtr' Failed to exec: `mv' Failed to exec: `mmv' Failed to exec: `nice' Failed to exec: `nl' Failed to exec: `nohup' Failed to exec: `notify-send' Failed to exec: `nslookup' Failed to exec: `open' Failed to exec: `op' Failed to exec: `passwd' Failed to exec: `paste' Failed to exec: `ping' Failed to exec: `pkill' Failed to exec: `popd' Failed to exec: `pr' Failed to exec: `printf' Failed to exec: `ps' Failed to exec: `pushd' Failed to exec: `pwd' Failed to exec: `quota' Failed to exec: `quotacheck' Failed to exec: `quotactl' Failed to exec: `ram' Failed to exec: `rcp' Failed to exec: `read' Failed to exec: `readonly' Failed to exec: `rename' Failed to exec: `return' Failed to exec: `rev' Failed to exec: `rm' Failed to exec: `rmdir' Failed to exec: `rsync' Failed to exec: `screen' Failed to exec: `scp' Failed to exec: `sdiff' Failed to exec: `sed' Failed to exec: `select' Failed to exec: `seq' Failed to exec: `set' Failed to exec: `shift' Failed to exec: `shopt' Failed to exec: `shutdown' Failed to exec: `sleep' Failed to exec: `slocate' Failed to exec: `sort' Failed to exec: `source' Failed to exec: `split' Failed to exec: `ssh' Failed to exec: `su' Failed to exec: `sudo' Failed to exec: `sum' Failed to exec: `suspend' Failed to exec: `symlink' Failed to exec: `sync' Failed to exec: `tail' Failed to exec: `tar' Failed to exec: `tee' Failed to exec: `test' Failed to exec: `time' Failed to exec: `times' Failed to exec: `touch' Failed to exec: `top' Failed to exec: `traceroute' Failed to exec: `tr' Failed to exec: `true' Failed to exec: `tsort' Failed to exec: `tty' Failed to exec: `type' Failed to exec: `ulimit' Failed to exec: `umask' Failed to exec: `unalias' Failed to exec: `uname' Failed to exec: `unexpand' Failed to exec: `uniq' Failed to exec: `units' Failed to exec: `unset' Failed to exec: `unshar' Failed to exec: `until' Failed to exec: `useradd' Failed to exec: `userdel' Failed to exec: `usermod' Failed to exec: `users' Failed to exec: `uuencode' Failed to exec: `uudecode' Failed to exec: `vi' Failed to exec: `vmstat' Failed to exec: `wait' Failed to exec: `watch' Failed to exec: `wc' Failed to exec: `whereis' Failed to exec: `which' Failed to exec: `while' Failed to exec: `who' Failed to exec: `whoami' Failed to exec: `write' Failed to exec: `xargs' Failed to exec: `xdg-open' Failed to exec: `yes' Failed to exec: `.' Failed to exec: `!!' Failed to exec: `###'