php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #45619 parse_str() documentation
Submitted: 2008-07-24 22:45 UTC Modified: 2008-08-01 18:43 UTC
From: the_N_Channel at hotmail dot com Assigned:
Status: Not a bug Package: Documentation problem
PHP Version: Irrelevant OS: Windows
Private report: No CVE-ID: None
 [2008-07-24 22:45 UTC] the_N_Channel at hotmail dot com
Description:
------------
The documentation on parse_str() does not specify the delimiter used to parse the string. Given the examples authors quote in the comments section, it appears to be &. W3C also recommends ";", however in my trials I have not been able to make it work with ";". Is this delimiter assumed to be "&" in the function body, is there a magic place where this delimiter can be set? That kind of information seems like it should be in the doc for the function.   


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-08-01 11:24 UTC] dmytton@php.net
The delimiter is set in php.ini. Default is &. Change arg_separator.input to suit your requirements.
 [2008-08-01 18:43 UTC] the_N_Channel at hotmail dot com
Cute. That answers the question but doesn't address the issue. Sure, now *I* know how to do it, but doesn't it seem relevant to add a Note after the two already existing notes that makes this explicit? Here's the code:

<blockquote><p><b class="note">Note</b>: 
   
    The default delimiter is set to &amp in the <em class="emphasis">php.ini.</em>, The current W3C standard also supports ;, if you'd like to change the delimiter, change the setting of <b> arg_separator.input </b> to suit your requirements. 
   <br />
</p></blockquote>

There, is that so hard? I'm pretty sure I'm not the only one who's had that question, who knows how many people are writing their own functions and wasting their time when it can be documented so simply?
 
PHP Copyright © 2001-2026 The PHP Group
All rights reserved.
Last updated: Thu Jun 18 01:00:02 2026 UTC