Test: /ext/json/tests/bug50224.phpt - Version 7.2.0RC4        

Bug #50224 json_encode() does not always encode a float as a float
Submitted: 2009-11-19 05:45:10 Modified: 2014-07-15 11:45:18
From: christian.lawrence Assigned:
Status: Closed Package: JSON related
PHP Version: 5.2SVN-2009-11-19 (snap) OS:

There are 2 different diffs reported by users for this test.

Count Diff
4 (80%)
003+ string(18) "12.300000000000001"
003- string(4) "12.3"
007+ string(28) "[12,12.0,12.300000000000001]"
007- string(14) "[12,12.0,12.3]"
1 (20%)
003+ string(51) "12.300000000000000710542735760100185871124267578125"
003- string(4) "12.3"
007+ string(61) "[12,12.0,12.300000000000000710542735760100185871124267578125]"
007- string(14) "[12,12.0,12.3]"