3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $output = shell_exec('cd /'); echo $output; $output = shell_exec("ls"); echo $output; ?>
Output for 5.6.28, 7.0.14 - 7.1.0
Output for 4.3.2 - 5.6.25, 7.0.0 - 7.0.10
Warning: shell_exec(): Unable to execute 'cd /' in /in/VfTnd on line 2 Warning: shell_exec(): Unable to execute 'ls' in /in/VfTnd on line 4
Output for hhvm-3.10.0 - 3.12.0
Failed to exec: `cd /' Failed to exec: `ls'
Output for 4.3.0 - 4.3.1
Warning: shell_exec() [http://www.php.net/function.shell-exec]: Unable to execute 'cd /' in /in/VfTnd on line 2 Warning: shell_exec() [http://www.php.net/function.shell-exec]: Unable to execute 'ls' in /in/VfTnd on line 4