3v4l.org

run code in 300+ PHP versions simultaneously
<?php $items = array( "Home", "Pages" => array( "About", "Services", "Products", "Contact", "FAQs", "Sitemap", "Privacy Policy" ), "Column Layouts" => array( "1 Column", "2 Column (Left Sidebar)", "2 Column (Right Sidebar)", "3 Column", "4 Column" ) ); echo "<ul>"; function getMenu($array) { foreach($array as $key => $value) { if(is_array($value)) { echo "<li>" . $key . "</li>"; echo "<ul>"; getMenu($value); echo "</ul>"; } else { echo "<li>" . $value . "</li>"; } } } echo "</ul>"; getMenu($items);
Output for git.master, git.master_jit, rfc.property-hooks
<ul></ul><li>Home</li><li>Pages</li><ul><li>About</li><li>Services</li><li>Products</li><li>Contact</li><li>FAQs</li><li>Sitemap</li><li>Privacy Policy</li></ul><li>Column Layouts</li><ul><li>1 Column</li><li>2 Column (Left Sidebar)</li><li>2 Column (Right Sidebar)</li><li>3 Column</li><li>4 Column</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:
41.93 ms | 401 KiB | 8 Q