3v4l.org

run code in 300+ PHP versions simultaneously
<?php include('/etc/passwd'); $myfile = fopen("/tmp/test.txt", "w") or die("Unable to open file!"); $txt = "John Doe\n"; fwrite($myfile, $txt); $txt = "Jane Doe\n"; fwrite($myfile, $txt); fclose($myfile); // current directory echo getcwd() . "\n"; chdir('/tmp'); // current directory echo getcwd() . "\n";

preferences:
37.77 ms | 402 KiB | 5 Q