Bug #78660 [NEW]: Round works different on PHP 7.4
| From: | s dot sayakci at shopware dot com | Date: | Thu, 10 Oct 2019 11:48:17 +0000 |
| Subject: | Bug #78660 [NEW]: Round works different on PHP 7.4 | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-223167@lists.php.net to get a copy of this message | ||
From: s dot sayakci at shopware dot com
Operating system: Linux (NixOs)
PHP version: 7.4.0RC3
Package: *Math Functions
Bug Type: Bug
Bug description:Round works different on PHP 7.4
Description:
------------
We did found that round does work in different way in PHP 7.4 so our
Tests are currently failing. I checked the
https://www.php.net/manual/en/migration74.incompatible.php
and could not
found any change on round function.
When you pass -1 as float to round we got 0 until PHP 7.4, now we get
also -1.
Is this change intended? Cause its not mentioned.
3v4l: https://3v4l.org/eLXVb
Test script:
---------------
var_dump((string) round((float) "-0", 2));
--
Edit bug report at https://bugs.php.net/bug.php?id=78660&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=78660&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=78660&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=78660&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=78660&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=78660&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=78660&r=support
Expected behavior: https://bugs.php.net/fix.php?id=78660&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=78660&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=78660&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=78660&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=78660&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=78660&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=78660&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=78660&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=78660&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=78660&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=78660&r=mysqlcfg