Andrea, I am not a specialist in float numbers, but I think integral float numbers have a fractional part with value 0.
JSON_FLOAT_ADD_POINT_ZERO can be confuse for regular floats with non-zero as fractional part. Seems you are going to add a point zero in a regular float with point something. Anyway, I am open to rename the constant to make it clear for everyone. I just can't find a better name than that. By the way, this name was proposed by Kevin Israel (plstand) on the PR. On Thu, Dec 25, 2014 at 9:01 PM, Andrea Faulds <a...@ajf.me> wrote: > > > On 25 Dec 2014, at 19:32, Juan Basso <jrba...@gmail.com> wrote: > > > > The RFC can be found here: > > https://wiki.php.net/rfc/json_preserve_fractional_part > > Hey Juan, > > A further thought: is “Preserve Fractional Part” the best name? Integral > floats like float(12) don’t have any fractional part, and besides, the name > doesn’t tell you what it does IMO. Perhaps something like > JSON_FLOAT_ADD_POINT_ZERO? It’s more literal and, I think, more obvious. > > Thanks. > > -- > Andrea Faulds > http://ajf.me/ > > > > >