# Proposal: change precision for output functions

- Thread: https://externals.io/message/103694
- Original archive: https://news-web.php.net/php.internals/103694
- Started by Semen Dubina on 2019-01-07T15:38:48+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #103694 — Semen Dubina — 2019-01-07T15:38:48+00:00

URL: https://externals.io/message/103694#103694

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/
