Path: csiph.com!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.php Subject: Re: Rant: http_build_query() and arg_separator.output Date: Fri, 26 Aug 2016 11:48:19 +0200 Organization: solani.org Lines: 25 Message-ID: References: <71e67ba6-2bd8-bc0f-3276-b8dbfd6b75c9@arnowelzel.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1472204895 9203 eJwFwYEBwDAEBMCVUE+Moy/2HyF3+EKD6YFwLDamNklC/pu+p5ulR6dg3ZcyjfRrKWEDST40DRGR (26 Aug 2016 09:48:15 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 26 Aug 2016 09:48:15 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 X-User-ID: eJwFwYEBwCAIA7CXZLYVzkG2/n/CEm6F5kAUaFrHxsXCV533OsY18KwiVf3Ui86VkXwm1PsHKLQRDw== X-NNTP-Posting-Host: eJwFwQkBwDAIA0BLfAlMzlrAv4Tewam8GQQDi00/Myt1c4CkCao/LEdS/3CGtVUfwMe0tB8UghB9 Cancel-Lock: sha1:BQ/XeVyr6gJy+VEYUOacXg5GX6I= In-Reply-To: <71e67ba6-2bd8-bc0f-3276-b8dbfd6b75c9@arnowelzel.de> Xref: csiph.com comp.lang.php:16979 On 26.08.2016 at 09:05, Arno Welzel wrote: > Anway - the original behaviour of http_build_query() was to use single > ampersands. > > But NOW the default behaviour is just unpredictable, since the function > uses either a single ampersand OR if set the runtime configuration > arg_separator.output. That's not quite correct. Actually, arg_separator.output is available as of PHP 4.0.5, but http_build_query() has been introduced in PHP 5.0.0 only, and the function used the ini setting from the beginning. So there has not been a BC break here. Furthermore, http_build_query()'s behavior is not unpredictable, but it rather depends on a PHP_INI_ALL ini setting (unless the $arg_separator argument is set). A portable software is supposed to either set $arg_separator or arg_separator.output when using http_build_query() (or at the very least to document the issue). So I suggest that you file a ticket for the software that doesn't do so. -- Christoph M. Becker