Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43227 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 44579 invoked from network); 2 Mar 2009 16:43:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Mar 2009 16:43:47 -0000 Authentication-Results: pb1.pair.com header.from=scott@macvicar.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=scott@macvicar.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain macvicar.net from 193.227.246.108 cause and error) X-PHP-List-Original-Sender: scott@macvicar.net X-Host-Fingerprint: 193.227.246.108 ip246-108-v193.static.x-ip.net Received: from [193.227.246.108] ([193.227.246.108:50411] helo=lovelace.midden.org.uk) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D7/EE-00495-2CC0CA94 for ; Mon, 02 Mar 2009 11:43:47 -0500 Received: from office.vbulletin.com ([217.155.246.60] helo=[10.0.0.116]) by lovelace.midden.org.uk with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1LeBEy-0005Lt-Vx; Mon, 02 Mar 2009 16:43:43 +0000 Message-ID: <49AC0CB7.6@macvicar.net> Date: Mon, 02 Mar 2009 16:43:35 +0000 User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: RQuadling@googlemail.com CC: PHP Internals List References: <10845a340903020821v718bc762g243864f7e098ee1c@mail.gmail.com> <49AC08EA.5000105@macvicar.net> <10845a340903020836u67ba1600qd4be7101f4256863@mail.gmail.com> In-Reply-To: <10845a340903020836u67ba1600qd4be7101f4256863@mail.gmail.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -4.3 X-Spam_Report: Spam detection software, running on the system "lovelace.midden.org.uk", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Richard Quadling wrote: > 2009/3/2 Scott MacVicar : >> Richard Quadling wrote: >>> Hi. >>> >>> Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch >>> to the unit tests too. >>> >>> Any chance this could get committed to 5.2+ >>> >> I'm too convinced of the parameter name and I don't think its something >> that should be added to 5.2.9 since its a feature. >> >> Scott >> > > 5.3+ would be OK then. > > As to the param name, I'm not actually changing the name, just adding > another flag. > > In javascript's terminology,the output is an array ... > > [] > > or a hash > > {} > > So forcing a hash for arrays is pretty much what would be wanted and I > as I comment in the request, we have a "force" option when coming FROM > json data ... json_decode ( string $json [, bool $assoc= false [, int > $depth= 512 ]] ) > > And the "name" of the param here is appropriate to PHP's use (assoc is > not part of JSON's or JS's terminology). > > If you can think of a better name for the flag, then I'd be glad to use it. > [...] Content analysis details: (-4.3 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.1 AWL AWL: From: address is in the auto white-list Subject: Re: [PHP-DEV] Patch and test cases too for From: scott@macvicar.net (Scott MacVicar) Richard Quadling wrote: > 2009/3/2 Scott MacVicar : >> Richard Quadling wrote: >>> Hi. >>> >>> Regarding http://bugs.php.net/bug.php?id=47493, I've supplied a patch >>> to the unit tests too. >>> >>> Any chance this could get committed to 5.2+ >>> >> I'm too convinced of the parameter name and I don't think its something >> that should be added to 5.2.9 since its a feature. >> >> Scott >> > > 5.3+ would be OK then. > > As to the param name, I'm not actually changing the name, just adding > another flag. > > In javascript's terminology,the output is an array ... > > [] > > or a hash > > {} > > So forcing a hash for arrays is pretty much what would be wanted and I > as I comment in the request, we have a "force" option when coming FROM > json data ... json_decode ( string $json [, bool $assoc= false [, int > $depth= 512 ]] ) > > And the "name" of the param here is appropriate to PHP's use (assoc is > not part of JSON's or JS's terminology). > > If you can think of a better name for the flag, then I'd be glad to use it. > The JSON spec refers to them as arrays or objects though, as does our documentation I believe. PHP_JSON_FORCE_OBJECT I however have another patch for more strict encoding so I'll try to roll this in a single update. Scott