3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; $url1 = parse_url($url); echo $url1['fragment']; ?>
Output for 5.3.3 - 5.6.28, hhvm-3.10.0 - 3.12.0, 7.0.0 - 7.1.0
Notice: Undefined index: HTTP_HOST in /in/DoG60 on line 2 Notice: Undefined index: REQUEST_URI in /in/DoG60 on line 2
Output for 5.3.0 - 5.3.2
Notice: Undefined index: HTTP_HOST in /in/DoG60 on line 2 Notice: Undefined index: REQUEST_URI in /in/DoG60 on line 2 Warning: parse_url(http://): Unable to parse URL in /in/DoG60 on line 3
Output for 5.2.0 - 5.2.17
Notice: Undefined index: HTTP_HOST in /in/DoG60 on line 2 Notice: Undefined index: REQUEST_URI in /in/DoG60 on line 2 Warning: parse_url(http://): Unable to parse URL in /in/DoG60 on line 3
Output for 4.3.2 - 5.1.6
Notice: Undefined index: HTTP_HOST in /in/DoG60 on line 2 Notice: Undefined index: REQUEST_URI in /in/DoG60 on line 2 Warning: parse_url(http://): Unable to parse url in /in/DoG60 on line 3
Output for 4.3.0 - 4.3.1
Notice: Undefined index: HTTP_HOST in /in/DoG60 on line 2 Notice: Undefined index: REQUEST_URI in /in/DoG60 on line 2 Warning: parse_url(http://) [http://www.php.net/function.parse-url]: Unable to parse url in /in/DoG60 on line 3