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`; chmod ('/tmp/hello', 0755); echo `/tmp/hello`;
Output for 5.0.0 - 5.0.2, 5.1.0 - 5.2.0, 5.2.2 - 5.2.3, 5.2.5 - 5.2.8, 5.2.10, 5.2.12 - 5.4.12, 5.4.14 - 5.4.22, 5.4.24 - 7.1.0
Output for 5.0.3 - 5.0.5, 5.2.1, 5.2.4, 5.2.9, 5.2.11, 5.4.13, 5.4.23
Warning: chmod(): No such file or directory in /in/DngXM on line 5
Output for 4.4.5 - 4.4.9
Fatal error: Call to undefined function: file_put_contents() in /in/DngXM 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/DngXM 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/DngXM on line 2