Skip to content

Commit 158b537

Browse files
committed
Change default for serialize_precision to -1 (use mode 0)
1 parent 71774c2 commit 158b537

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

php.ini-development

+4-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ unserialize_callback_func =
285285
; When floats & doubles are serialized store serialize_precision significant
286286
; digits after the floating point. The default value ensures that when floats
287287
; are decoded with unserialize, the data will remain the same.
288-
serialize_precision = 17
288+
; The value is also used for json_encode when encoding double values.
289+
; If -1 is used, then dtoa mode 0 is used which automatically select the best
290+
; precision.
291+
serialize_precision = -1
289292

290293
; open_basedir, if set, limits all file operations to the defined directory
291294
; and below. This directive makes most sense if used in a per-directory

php.ini-production

+4-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,10 @@ unserialize_callback_func =
285285
; When floats & doubles are serialized store serialize_precision significant
286286
; digits after the floating point. The default value ensures that when floats
287287
; are decoded with unserialize, the data will remain the same.
288-
serialize_precision = 17
288+
; The value is also used for json_encode when encoding double values.
289+
; If -1 is used, then dtoa mode 0 is used which automatically select the best
290+
; precision.
291+
serialize_precision = -1
289292

290293
; open_basedir, if set, limits all file operations to the defined directory
291294
; and below. This directive makes most sense if used in a per-directory

0 commit comments

Comments
 (0)