3v4l.org

run code in 300+ PHP versions simultaneously
<?php if ($handle = opendir('/in/')) { echo "Directory handle: $handle\n"; echo "Entries:\n"; /* This is the correct way to loop over the directory. */ while (false !== ($entry = readdir($handle))) { echo "$entry\n"; } /* This is the WRONG way to loop over the directory. */ while ($entry = readdir($handle)) { echo "$entry\n"; } closedir($handle); }

preferences:
35.33 ms | 402 KiB | 5 Q