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
 [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

Pull Requests

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-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC