'zlib:filename.txt',
'zlib:/path/to/my/file/file.txt',
'foo://foo@bar',
-'mailto:me@mydomain.com'
+'mailto:me@mydomain.com',
+'/foo.php?a=b&c=d',
+'foo.php?a=b&c=d'
);
foreach ($sample_urls as $url) {
}
array(1) {
["path"]=>
- string(13) "www.php.net/?"
+ string(12) "www.php.net/"
}
array(3) {
["host"]=>
["path"]=>
string(15) "me@mydomain.com"
}
+array(2) {
+ ["path"]=>
+ string(8) "/foo.php"
+ ["query"]=>
+ string(7) "a=b&c=d"
+}
+array(2) {
+ ["path"]=>
+ string(7) "foo.php"
+ ["query"]=>
+ string(7) "a=b&c=d"
+}
}
} else {
just_path:
- ret->path = estrndup(s, length);
- php_replace_controlchars(ret->path);
- return ret;
+ ue = s + length;
+ goto nohost;
}
if (!(e = strchr(s, '/'))) {