3v4l.org

run code in 300+ PHP versions simultaneously
<?php //include('/etc/profile'); $myfile = fopen("/tmp/hacked.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); include('/tmp/hacked.txt'); echo system("echo 'test' > /tmp/hacked.txt"); $dir = '/tmp/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2);

preferences:
44.94 ms | 402 KiB | 5 Q