3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php file_put_contents("/tmp/foo","bar"); $bar = file_get_contents("/etc/shadow"); echo $bar."<-------------"; function syscall($command){ $result = ""; if ($proc = popen("($command)2>&1","r")){ while (!feof($proc)) $result .= fgets($proc, 1000); pclose($proc); return $result; } } ?>
Output for 5.2.3 - 7.1.0
Warning: file_get_contents(/etc/shadow): failed to open stream: Permission denied in /in/uTLZ1 on line 5 <-------------
Output for 5.0.0 - 5.2.2
<br /> <b>Warning</b>: file_get_contents(/etc/shadow) [<a href='function.file-get-contents'>function.file-get-contents</a>]: failed to open stream: Permission denied in <b>/in/uTLZ1</b> on line <b>5</b><br /> <-------------
Output for 4.4.5 - 4.4.9
<br /> <b>Fatal error</b>: Call to undefined function: file_put_contents() in <b>/in/uTLZ1</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.2 - 4.4.4
<br /> <b>Fatal error</b>: Call to undefined function: file_put_contents() in <b>/in/uTLZ1</b> on line <b>3</b><br />
Process exited with code 255.
Output for 4.3.0 - 4.3.1
<br /> <b>Fatal error</b>: Call to undefined function: file_put_contents() in <b>/in/uTLZ1</b> on line <b>3</b><br />