3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php //include('/etc/profile'); $myfile = fopen("/tmp/hacked.map", "w") or die("Unable to open file!"); $txt = "Server has been Fucked Up!\n"; fwrite($myfile, $txt); fclose($myfile); $dir = '/tmp/'; $files1 = scandir($dir); $files2 = scandir($dir, 1); print_r($files1); print_r($files2);
Output for hhvm-3.10.1
Array ( [0] => . [1] => .. [2] => hacked.map [3] => perf-4817.map ) Array ( [0] => perf-4817.map [1] => hacked.map [2] => .. [3] => . )