3v4l.org

run code in 150+ php & hhvm versions
Bugs & Features
<?php $url = 'ftp://some.ftp.host.ru/path/to/main.page.htm'; var_dump(parse_url($url)); var_dump(pathinfo($url));
Output for 5.2.0 - 5.6.28, hhvm-3.10.0 - 3.13.2, 7.0.0 - 7.1.0
array(3) { ["scheme"]=> string(3) "ftp" ["host"]=> string(16) "some.ftp.host.ru" ["path"]=> string(22) "/path/to/main.page.htm" } array(4) { ["dirname"]=> string(30) "ftp://some.ftp.host.ru/path/to" ["basename"]=> string(13) "main.page.htm" ["extension"]=> string(3) "htm" ["filename"]=> string(9) "main.page" }
Output for 4.3.0 - 5.1.6
array(3) { ["scheme"]=> string(3) "ftp" ["host"]=> string(16) "some.ftp.host.ru" ["path"]=> string(22) "/path/to/main.page.htm" } array(3) { ["dirname"]=> string(30) "ftp://some.ftp.host.ru/path/to" ["basename"]=> string(13) "main.page.htm" ["extension"]=> string(3) "htm" }