Hi all and Ferenc,

On Mon, Sep 28, 2015 at 4:51 AM, Anatol Belski <anatol....@belski.net> wrote:
>> -----Original Message-----
>> From: jakub....@gmail.com [mailto:jakub....@gmail.com] On Behalf Of Jakub
>> Zelenka
>> > Exactly, so my question was - why it still needs to do "if (mode == 0)
>> > ndigit = 17;" in snprintf at the place I've linked? It won't have any
>> > effect as zend_dtoa will ignore it :)
>> >
>>
>> As I said in the PR some time ago, it's not used by dtoa for mode 0 but it's 
>> still
>> used by php_gcvt for checking if exponential or decimal notation should be
>> used. See
>>
>> https://github.com/php/php-
>> src/blob/250938e2d35fc54161a18167b7901c5e3b574371/main/snprintf.c#L163
>>
> Ah, I see it now. The patch is quite sparse, so have to check the whole 
> functions. Thanks for the explanations.
>
> For 7.0 raising the precision INIs to max supported were probably OK, but no 
> new INI options should be added. And IMHO, there should be only one INI 
> option change, and preferably full patch with json_precision in 7.1 and not 
> touching other branches (the simplest solution). As it seems, one sees it 
> critical to start using 17 digits in 7.0 - then probably vote were eligible 
> (whereby I wouldn't see it critical). But then IMHO - switch to 
> serialize_precision in 7.0 and keep the name for 7.1 with full patch. Though 
> please be aware that times are going fast, if you decide to put something 7.0 
> related to the vote, be sure the results stand till RC5.

Thank you for explanation, Jakub.

Ferenc, are you OK with the JSON serialize precision change?
i.e. Use PG(serialize_precision) rather than EG(precision) when
json_serialize() is called.
If yes, I'll prepare the patch and start the vote immediately.

Regards,

--
Yasuo Ohgaki
yohg...@ohgaki.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to