Re: [RFC] [DISCUSSION] More precise float value

From: Date: Mon, 30 May 2016 19:07:04 +0000
Subject: Re: [RFC] [DISCUSSION] More precise float value
References: 1 2 3 4  Groups: php.internals 
Request: Send a blank email to internals+get-93639@lists.php.net to get a copy of this message
On Mon, May 30, 2016 at 7:46 PM, Fleshgrinder <php@fleshgrinder.com> wrote: > On 5/30/2016 8:28 PM, Nikita Popov wrote: > > This proposal adds a new json.precision setting. Why? I've been told that > > this is more flexible, which is fair enough, but imho we should have very > > strong reasons for introducing new ini settings. Reasons that go beyond > "it > > might be useful to someone ... maybe?" So what's the particular use-case > > here? Where is it necessary to export inaccurate floating point numbers > in > > JSON? And should such a use-case indeed exist, why is this a global > setting > > rather than an option of json_encode? Furthermore, note that even without > > this new ini option, you always have the option of temporarily changing > > serialize_precision for a json_encode call, if you *really* need it. > > > > I second this remark especially because in my book JSON is just another > form of serialization, hence, it should use the same setting. > > Additionally, how is it possible that global ini settings -- which in my > opinion is a sensitive area -- can go through with a 50%+1 vote? > Not exactly a language change as it's changing default just for serialization and json but it's probably on the edge so will change it to 66 in the next revision... ;) Cheers

« previous php.internals (#93639) next »