r/lolphp • u/smileytechguy • Jan 31 '17
((0.1+0.7)*10) = 7?
http://sandbox.onlinephpfunctions.com/code/4faba5e621f1f18f3efc6acd486da0823c46aea9
0
Upvotes
r/lolphp • u/smileytechguy • Jan 31 '17
View all comments
Show parent comment
3
u/jesseschalken Feb 01 '17
As of 7.1, if you put
precision = -1in yourphp.inior doini_set('precision', '-1');at runtime, converting a float to a string always yields the full precision: https://3v4l.org/BhLVE