Edit report at https://bugs.php.net/bug.php?id=62844&edit=1
ID: 62844 Comment by: phpqa at sebastianmendel dot de Reported by: phpqa at sebastianmendel dot de Summary: parse_url() does not recognize // Status: Open Type: Bug Package: URL related Operating System: Linux PHP Version: 5.4.6 Block user comment: N Private report: N New Comment: even if doc says "This function doesn't work with relative URLs." it also says: "Partial URLs are also accepted, parse_url() tries its best to parse them correctly." and it parses relative URLs like /path/file.html?var=1&foo=bar#123 correctly Previous Comments: ------------------------------------------------------------------------ [2012-08-17 09:22:03] phpqa at sebastianmendel dot de Description: ------------ parse_url() does not recognize '//' as scheme to host separator and therefor does not recognize exemple.org as host in URL "//example.org" Test script: --------------- var_dump(parse_url('//example.org')); Expected result: ---------------- array(1) { 'host' => string(11) "example.org" } Actual result: -------------- array(1) { 'path' => string(14) "//example.org" } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=62844&edit=1