Bug #80912 [NEW]: wrong range() result
| From: | np25071984 at gmail dot com | Date: | Sun, 28 Mar 2021 07:28:44 +0000 |
| Subject: | Bug #80912 [NEW]: wrong range() result | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-233028@lists.php.net to get a copy of this message | ||
From: np25071984 at gmail dot com
Operating system: mac os Darwin
PHP version: 8.0.3
Package: Math related
Bug Type: Bug
Bug description:wrong range() result
Description:
------------
Since version 7.0.3 I get wrong result (without the last element).
Test script:
---------------
var_dump(range( 0.1, 1.2, 0.1 ));
Expected result:
----------------
array(12) {
[0]=>
float(0.1)
[1]=>
float(0.2)
[2]=>
float(0.3)
[3]=>
float(0.4)
[4]=>
float(0.5)
[5]=>
float(0.6)
[6]=>
float(0.7)
[7]=>
float(0.8)
[8]=>
float(0.9)
[9]=>
float(1)
[10]=>
float(1.1)
[10]=>
float(1.2)
}
Actual result:
--------------
array(11) {
[0]=>
float(0.1)
[1]=>
float(0.2)
[2]=>
float(0.3)
[3]=>
float(0.4)
[4]=>
float(0.5)
[5]=>
float(0.6)
[6]=>
float(0.7)
[7]=>
float(0.8)
[8]=>
float(0.9)
[9]=>
float(1)
[10]=>
float(1.1)
}
--
Edit bug report at https://bugs.php.net/bug.php?id=80912&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=80912&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=80912&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=80912&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=80912&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=80912&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=80912&r=support
Expected behavior: https://bugs.php.net/fix.php?id=80912&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=80912&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=80912&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=80912&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=80912&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=80912&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=80912&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=80912&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=80912&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=80912&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=80912&r=mysqlcfg