Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #16997

Re: Rant: http_build_query() and arg_separator.output

From Ben Bacarisse <ben.usenet@bsb.me.uk>
Newsgroups comp.lang.php
Subject Re: Rant: http_build_query() and arg_separator.output
Date 2016-08-30 15:10 +0100
Organization A noiseless patient Spider
Message-ID <87vayiwdnr.fsf@bsb.me.uk> (permalink)
References <71e67ba6-2bd8-bc0f-3276-b8dbfd6b75c9@arnowelzel.de> <npp38v$8vj$1@solani.org> <9a112104-5a9b-46dc-080e-5121d01697ee@arnowelzel.de> <87r397kbwn.fsf@bsb.me.uk> <e82d3eec-8316-d167-8184-6d7f988973d2@arnowelzel.de>

Show all headers | View raw


Arno Welzel <usenet@arnowelzel.de> writes:

> Ben Bacarisse schrieb am 2016-08-29 um 14:16:
>
>> Arno Welzel <usenet@arnowelzel.de> writes:
>> <snip>
>>> But why is the argument separator for URLs a configurable runtime
>>> option? It makes no sense at all.
>> 
>> It's configurable at run time because the separator can't be known (for
>> sure) ahead of that.  That fact my be what makes no sense to you, but
>> given that the PHP authors don't know what separator might be used,
>> there has to be some way to specify it.
>
> I talk about the separator for arguments in URLs. This is usually "&"
> and not unknown.

We may be taking at cross purposes because we seem to be agreeing but
using different emphasis.  Yes, it is usually "&" but unless is always
is, you need to be able to specify it.  I've seen services (rather old
ones now) that used ";".  In fact ";" was specified in some very early
RFCs for URLs for what were then called URL parameters (IIRC).  This was
not the query portion of the URL, but the habit of using ";" did cross
over into the query portion, at least for a while.

> Nobody expects something else as separator, except when
> using it in strings within an HTML document - but for this
> http_build_query() could have used a boolean paramter to control if
> separators should be output as "&" or "&amp;". And in fact the default
> for argument separators in URLs is "&".

Are you saying that "&" is now so universal that PHP need not concern
itself with any URLs that use some other separator?  If so, I don't feel
qualified to comment.  The last URL that I saw using something else is
long dead, so maybe PHP should just assume "&" will always be wanted.

<snip>
-- 
Ben.

Back to comp.lang.php | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-26 09:05 +0200
  Re: Rant: http_build_query() and arg_separator.output "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-26 11:48 +0200
    Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-29 07:43 +0200
      Re: Rant: http_build_query() and arg_separator.output Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-29 13:16 +0100
        Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-08-30 08:39 +0200
          Re: Rant: http_build_query() and arg_separator.output Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-08-30 15:10 +0100
            Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-09-01 08:43 +0200
              Re: Rant: http_build_query() and arg_separator.output Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-09-07 22:18 +0200
      Re: Rant: http_build_query() and arg_separator.output "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-08-29 14:53 +0200
        Re: Rant: http_build_query() and arg_separator.output Arno Welzel <usenet@arnowelzel.de> - 2016-09-01 08:53 +0200

csiph-web