3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php file_put_contents('/tmp/hello', "#!/bin/sh\necho im a good guy."); echo `echo /tmp/*`; echo `chmod +x /tmp/hello`; echo `/tmp/hello`;
Output for 5.4.45 - 5.6.21, 7.0.0 - 7.1.0
Output for hhvm-3.10.0 - 3.12.0
Failed to exec: `echo /tmp/*' Failed to exec: `chmod +x /tmp/hello' Failed to exec: `/tmp/hello'
Output for 5.3.29, 5.4.25 - 5.4.32, 5.4.36, 5.4.38 - 5.4.44
/tmp/hello sh: 1: chmod: not found sh: 1: /tmp/hello: Permission denied
Output for 5.4.37
/tmp/hello /tmp/hhbc.sq3 /tmp/perf-10459.map sh: 1: chmod: not found sh: 1: /tmp/hello: Permission denied
Output for 5.4.35
/tmp/hello /tmp/hhbc.sq3 /tmp/perf-23180.map sh: 1: chmod: not found sh: 1: /tmp/hello: Permission denied
Output for 5.4.34
/tmp/hello /tmp/hhbc.sq3 /tmp/perf-23174.map sh: 1: chmod: not found sh: 1: /tmp/hello: Permission denied
Output for 5.0.0 - 5.3.28, 5.4.0 - 5.4.24
/tmp/hello /tmp/test2 sh: 1: chmod: not found sh: 1: /tmp/hello: Permission denied
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: file_put_contents() in /in/TFsE2 on line 2
Process exited with code 255.
Output for 4.3.2 - 4.4.4
Fatal error: Call to undefined function: file_put_contents() in /in/TFsE2 on line 2
Process exited with code 255.
Output for 4.3.0 - 4.3.1
Fatal error: Call to undefined function: file_put_contents() in /in/TFsE2 on line 2