php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #31705 parse_url: http://foo.com#bar not recognized
Submitted: 2005-01-26 18:26 UTC Modified: 2005-01-27 17:38 UTC
From: cox at idecnet dot com Assigned:
Status: Closed Package: URL related
PHP Version: 4.3.10 OS: 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.
Password:
Status:
Package:
Bug Type:
Summary:
From: cox at idecnet dot com
New email:
PHP Version: OS:

 

 [2005-01-26 18:26 UTC] cox at idecnet dot com
Description:
------------
This url format is not recognized by parse_url():

http://foo.com#bar

Most browsers do recognize this format. Others like "http://foo.com?bar" are rightly parsed.


Tomas V.V.Cox

Reproduce code:
---------------
php -r 'print_r(parse_url("http://foo.com#bar"));'

Expected result:
----------------
Array
(
    [scheme] => http
    [host] => foo.com
    [fragment] => bar
)


Actual result:
--------------
Array
(
    [scheme] => http
    [host] => foo.com#bar
)


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-01-27 17:38 UTC] iliaa@php.net
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
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Jan 19 19:01:23 2021 UTC