3v4l.org

run code in 300+ PHP versions simultaneously
<?php $dir = "/root/"; // Open a directory, and read its contents if (is_dir($dir)){ if ($dh = opendir($dir)){ while (($file = readdir($dh)) !== false){ echo "filename:" . $file . "<br>"; } closedir($dh); } } ?>

preferences:
44.19 ms | 402 KiB | 5 Q