Fixed bug #50224 where float without decimals were converted to integer when encode to JSON

Refs #635
@datibbaw Technically it can, but it causes a warning on the compiler because `php_gcvt` expects a `char (*)` and `num` is `char (*)[1090]`. 

You can see the discussion here: https://github.com/php/php-src/pull/642#issuecomment-40947032