Hi!
>
> We can write
>
> $old = ini_set('precision', 17);
> json_encode($var);
> ini_set('precision', $old);
>
> everywhere to workaround this problem.
If we're talking about encoding, that's what precision setting is - it
says how much we want to preserve in decimal encoding of float numbers.
Decoding, of course, should use whatever data available and not
truncate, but I understand that is already happening?
> Question is "Is this the way it should be?".
I don't see why not. That's exactly what precision setting is for, as
far as I can see.
--
Stas Malyshev
[email protected]
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php