3v4l.org

run code in 300+ PHP versions simultaneously
<?php var_dump(parse_url('http://postcode.nl:80#@office.react.nl/')); echo "\n"; echo parse_url("http://example.com:80?@google.com/")["host"];
Output for 7.0.13 - 7.0.20, 7.1.0 - 7.1.20, 7.2.0 - 7.2.33, 7.3.16 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.28, 8.2.0 - 8.2.18, 8.3.0 - 8.3.7
array(4) { ["scheme"]=> string(4) "http" ["host"]=> string(11) "postcode.nl" ["port"]=> int(80) ["fragment"]=> string(17) "@office.react.nl/" } example.com
Output for 7.0.0 - 7.0.12
array(5) { ["scheme"]=> string(4) "http" ["host"]=> string(15) "office.react.nl" ["user"]=> string(11) "postcode.nl" ["pass"]=> string(3) "80#" ["path"]=> string(1) "/" } google.com

preferences:
151.26 ms | 402 KiB | 174 Q