3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php echo parse_url("http://example.com:80#@google.com/")["host"]; echo parse_url("http://example.com:80?@google.com/")["host"];
Output for 5.6.28 - 5.6.30, 7.0.13 - 7.3.0rc3
example.comexample.com
Output for 5.4.0 - 5.6.27, hhvm-3.10.1 - 3.17.3, 7.0.0 - 7.0.12
google.comgoogle.com
Output for 4.4.2 - 4.4.9, 5.1.0 - 5.3.29
Parse error: syntax error, unexpected '[', expecting ',' or ';' in /in/8EvA5 on line 3
Process exited with code 255.
Output for 4.3.0 - 4.3.1, 4.3.5 - 4.4.1, 5.0.0 - 5.0.5
Parse error: parse error, unexpected '[', expecting ',' or ';' in /in/8EvA5 on line 3
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `','' or `';'' in /in/8EvA5 on line 3
Process exited with code 255.