3v4l.org

run code in 300+ PHP versions simultaneously
<?php $directoryURI = $_SERVER['REQUEST_URI']; $path = parse_url($directoryURI, PHP_URL_PATH); $components = explode('/', $path); $first_part = $components[1]; ?> <ul id="mainnav"> <li class="<?php if ($first_part=="") {echo "active"; } ?>"><a href="#">Home</a></li> <li class="<?php if ($first_part=="tutorials") {echo "active"; } ?>"><a href="#">Tutorials</a></li> <li class="<?php if ($first_part=="resources") {echo "active"; } ?>"><a href="#">Resources</a></li> <li class="<?php if ($first_part=="library") {echo "active"; } ?>"><a href="#">Library</a></li> <li class="<?php if ($first_part=="our-projects") {echo "active"; } ?>"><a href="#">Our Projects</a></li> <li class="<?php if ($first_part=="community") {echo "active"; } ?>"><a href="#">Community</a></li> </ul>
Output for git.master, git.master_jit, rfc.property-hooks
Warning: Undefined array key "REQUEST_URI" in /in/SLYo9 on line 3 Deprecated: parse_url(): Passing null to parameter #1 ($url) of type string is deprecated in /in/SLYo9 on line 4 Warning: Undefined array key 1 in /in/SLYo9 on line 6 <ul id="mainnav"> <li class="active"><a href="#">Home</a></li> <li class=""><a href="#">Tutorials</a></li> <li class=""><a href="#">Resources</a></li> <li class=""><a href="#">Library</a></li> <li class=""><a href="#">Our Projects</a></li> <li class=""><a href="#">Community</a></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:
26.49 ms | 402 KiB | 8 Q