What should I do if the php round function is not accurate?

藏色散人
Release: 2023-03-10 09:04:01
Original
3429 people have browsed it

The solution to the inaccurate php round function: first find and open the php.ini configuration file; then set the content to "serialize_precision=-1".

What should I do if the php round function is not accurate?

The operating environment of this article: windows7 system, PHP7.1 version, DELL G3 computer

Solution to the problem of inaccurate accuracy after using round in php7.1 Solution

There is a problem with accuracy after using round(xx, 2) in the project, and the result is not rounded to 2 decimal places.

Googled for a long time and finally found a solution.

Set serialize_precision = -1 in php.ini That’s it

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of What should I do if the php round function is not accurate?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
php
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template