3v4l.org

run code in 300+ PHP versions simultaneously
<?php $myDirectory = opendir("etc"); // get each entry while($entryName = readdir($myDirectory)) { $dirArray[] = $entryName; } // close directory closedir($myDirectory); // count elements in array $indexCount = count($dirArray); Print ("$indexCount files<br>\n"); // sort 'em sort($dirArray); // print 'em print("<TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks>\n"); print("<TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR>\n"); // loop through the array of files and print them all for($index=0; $index < $indexCount; $index++) { if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files print("<TR><TD><a href=\"$dirArray[$index]\">$dirArray[$index]</a></td>"); print("<td>"); print(filetype($dirArray[$index])); print("</td>"); print("<td>"); print(filesize($dirArray[$index])); print("</td>"); print("</TR>\n"); } } print("</TABLE>\n"); ?>
Output for git.master, git.master_jit, rfc.property-hooks
28 files<br> <TABLE border=1 cellpadding=5 cellspacing=0 class=whitelinks> <TR><TH>Filename</TH><th>Filetype</th><th>Filesize</th></TR> <TR><TD><a href="arch-release">arch-release</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(arch-release) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(arch-release) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="crypttab">crypttab</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(crypttab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(crypttab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="fstab">fstab</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(fstab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(fstab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="group">group</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(group) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(group) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="gshadow">gshadow</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(gshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(gshadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="host.conf">host.conf</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(host.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(host.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="hosts">hosts</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(hosts) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(hosts) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="issue">issue</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(issue) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(issue) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="ld.so.conf">ld.so.conf</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(ld.so.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(ld.so.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="ld.so.conf.d">ld.so.conf.d</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(ld.so.conf.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(ld.so.conf.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="motd">motd</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(motd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(motd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="mtab">mtab</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(mtab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(mtab) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="nsswitch.conf">nsswitch.conf</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(nsswitch.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(nsswitch.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="pacman.d">pacman.d</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(pacman.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(pacman.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="passwd">passwd</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(passwd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(passwd) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="php.ini">php.ini</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(php.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(php.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="php_archive.ini">php_archive.ini</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(php_archive.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(php_archive.ini) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="profile">profile</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(profile) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(profile) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="profile.d">profile.d</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(profile.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(profile.d) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="protocols">protocols</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(protocols) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(protocols) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="resolv.conf">resolv.conf</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(resolv.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(resolv.conf) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="securetty">securetty</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(securetty) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(securetty) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="services">services</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(services) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(services) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="shadow">shadow</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(shadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(shadow) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="shells">shells</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(shells) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(shells) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> <TR><TD><a href="skel">skel</a></td><td> Warning: filetype(): open_basedir restriction in effect. File(skel) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 27 </td><td> Warning: filesize(): open_basedir restriction in effect. File(skel) is not within the allowed path(s): (/tmp:/in:/etc) in /in/Bb9b4 on line 30 </td></TR> </TABLE>

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:
46.95 ms | 421 KiB | 8 Q