Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:103694 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 50147 invoked from network); 7 Jan 2019 19:04:54 -0000 Received: from unknown (HELO forward102p.mail.yandex.net) (77.88.28.102) by pb1.pair.com with SMTP; 7 Jan 2019 19:04:54 -0000 Received: from mxback11o.mail.yandex.net (mxback11o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::62]) by forward102p.mail.yandex.net (Yandex) with ESMTP id EF1811D41E78 for ; Mon, 7 Jan 2019 18:38:48 +0300 (MSK) Received: from localhost (localhost [::1]) by mxback11o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id fbI4AN1bb7-cmXWEFiG; Mon, 07 Jan 2019 18:38:48 +0300 Received: by sas1-fed4e4c8a570.qloud-c.yandex.net with HTTP; Mon, 07 Jan 2019 18:38:48 +0300 Envelope-From: semen@sam002.net To: internals MIME-Version: 1.0 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Mon, 07 Jan 2019 18:38:48 +0300 Message-ID: <20129491546875528@sas1-fed4e4c8a570.qloud-c.yandex.net> Content-Transfer-Encoding: 7bit Content-Type: text/plain Subject: Proposal: change precision for output functions From: php@sam002.net (Semen Dubina) Hi, everyone! Original PR and description see: https://github.com/php/php-src/pull/3460. Because of the accuracy constraint set by the 'precision' variable, debugging problems often occur, and many developers consider the limited accuracy to be a feature of the language. For better compatibility with other languages and predictable behavior, I suggest changing the default value of the variable 'precision' to -1. In the tracker you can find several bugs in which people trusted output of 'var_dump' and 'echo': https://bugs.php.net/bug.php?id=66866 https://bugs.php.net/bug.php?id=66959 https://bugs.php.net/bug.php?id=68551 https://bugs.php.net/bug.php?id=73358 Examples: https://3v4l.org/Mr4KM If you know a case when it will violate some task, describe it, please. I think that the trusting of FLOAT is a very bad practice. -- Semen V. Dubina https://sam002.net/