3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH); $base = dirname($_SERVER['SCRIPT_NAME']); if (0 === strpos($uri, $base)) { $baseuri = substr($uri, strlen($base)); } var_dump($baseuri);

Shows result from various feature-branches currently under review from the php developers. Contact me to have additional branches featured.

Output for Typed properties v2
Notice: Undefined index: REQUEST_URI in /in/VjLBs on line 3 Notice: Undefined variable: baseuri in /in/VjLBs on line 11 NULL
Output for Lexical anon
Notice: Undefined index: REQUEST_URI in /in/VjLBs on line 3 Notice: Undefined variable: baseuri in /in/VjLBs on line 11 NULL

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