3v4l.org

run code in 300+ PHP versions simultaneously
<?php function treeList($path = "") { $prefix = ($path == "") ? $_SERVER['DOCUMENT_ROOT'] : ""; $return = preg_replace("#(.*)/(.*)$#u","\$1",$path); echo ' <ul> '; echo ' <li><a href="?path='.$return.'">[...назад...]</a></li> '; foreach (glob($_SERVER['DOCUMENT_ROOT']."$path/*") as $item) { $isdir = (is_dir($item)) ? true : false; $item = str_replace(array($_SERVER['DOCUMENT_ROOT'],"//"),array("","/"),$item); if ($isdir) echo ' <li><b><a href="?path='.$item.'">'.$item.'</a></b></li> '; else echo ' <li>'.$item.'</li> '; } echo ' </ul> '; } $path = (isset($_GET['path'])) ? $_GET['path'] : ""; header("Content-Type: text/html; charset=utf-8"); treeList($path);
Output for git.master, git.master_jit, rfc.property-hooks
<ul> <li><a href="?path=">[...назад...]</a></li> <li><b><a href="?path=/etc">/etc</a></b></li> <li><b><a href="?path=/in">/in</a></b></li> <li><b><a href="?path=/tmp">/tmp</a></b></li> </ul>

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.72 ms | 401 KiB | 8 Q