Test: /ext/json/tests/bug50224.phpt - Version 7.1.0RC5        

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 3 different diffs reported by users for this test.

Count Diff
2 (50%)
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 (25%)
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]"
1 (25%)