GD_RELEASE_VERSION, GD_EXTRA_VERSION and GD_VERSION_STRING. (Pierre)
- Fixed bug #41576 (configure failure when using --without-apxs or some
other SAPIs disabling options). (Jani)
+- Fixed bug #41567 (json_encode() double conversion is inconsistent with
+ PHP). (Lucas, Ilia)
- Fixed bug #41555 (configure failure: regression caused by fix for #41265).
(Jani)
- Fixed bug #41518 (file_exists() warns of open_basedir restriction on
double dbl = Z_DVAL_P(val);
if (!zend_isinf(dbl) && !zend_isnan(dbl)) {
- len = spprintf(&d, 0, "%.9g", dbl);
+ len = spprintf(&d, 0, "%.*g", (int) EG(precision), dbl);
if (d) {
if (dbl > LONG_MAX && !memchr(d, '.', len)) {
smart_str_append_unsigned(buf, (unsigned long)Z_DVAL_P(val));
--- /dev/null
+--TEST--
+Bug #41567 (json_encode() double conversion is inconsistent with PHP)
+--FILE--
+<?php
+
+$a = json_encode(123456789.12345);
+var_dump(json_decode($a));
+
+echo "Done\n";
+?>
+--EXPECT--
+float(123456789.12345)
+Done