|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32813 parse_url does not parse 'scheme:' correctly.
Submitted: 2005-04-24 22:30 UTC Modified: 2005-04-26 01:50 UTC
From: mpb dot mail at gmail dot com Assigned:
Status: Closed Package: *URL Functions
PHP Version: 4.*, 5.* OS: FreeBSD and Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: mpb dot mail at gmail dot com
New email:
PHP Version: OS:


 [2005-04-24 22:30 UTC] mpb dot mail at gmail dot com
parse_url does not parse 'scheme:' correctly.


5. BNF for specific URL schemes


genericurl     = scheme ":" schemepart


schemepart     = *xchar | ip-schemepart


In other words, 'scheme:' is a complete and valid URL; the empty string is a valid schemepart.

parse_url ('scheme:') claims that the *host* is 'scheme'.  This is incorrect.  The *scheme* is 'scheme'.


Reproduce code:
var_dump (parse_url ('scheme:'));

Expected result:
array(1) {
  string(6) "scheme"

Actual result:
array(1) {
  string(6) "scheme"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-26 01:50 UTC]
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Sep 30 14:01:24 2023 UTC