3v4l.org

run code in 300+ PHP versions simultaneously
<?php //$filedir = "upload"; function showDir( $filedir ) { //打开目录 $dir = @ dir($filedir); //列出目录中的文件 //while (($file = $dir->read())!==false) while(($file = readdir($dir)) !== false) { if(is_dir($filedir."/".$file) AND ($file!=".") AND ($file!="..")) { // echo "dirname: ".$file."<br />"; showDir($filedir."/".$file); } else { echo "filename: " .$filedir."/".$file . "<br />"; } } $dir->close(); } showDir("."); ?>
Output for git.master, git.master_jit, rfc.property-hooks
Fatal error: Uncaught TypeError: readdir(): Argument #1 ($dir_handle) must be of type resource or null, false given in /in/gAWZY:8 Stack trace: #0 /in/gAWZY(8): readdir(false) #1 /in/gAWZY(20): showDir('.') #2 {main} thrown in /in/gAWZY on line 8
Process exited with code 255.

This tab shows result from various feature-branches currently under review by the php developers. Contact me to have additional branches featured.

Active branches

Archived branches

Once feature-branches are merged or declined, they are no longer available. Their functionality (when merged) can be viewed from the main output page


preferences:
42.43 ms | 401 KiB | 8 Q