Doc #77674 [NEW]: Range function doesn't include

From: Date: Wed, 27 Feb 2019 10:28:23 +0000
Subject: Doc #77674 [NEW]: Range function doesn't include
Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-16432@lists.php.net to get a copy of this message
From: lifekent at gmail dot com Operating system: Linux PHP version: 7.2.15 Package: Documentation problem Bug Type: Documentation Problem Bug description:Range function doesn't include Description: ------------ --- From manual page: https://php.net/function.range --- If this is an intended behavior than it must be in the http://php.net/manual/en/doc.changelog.php Range function description: The sequence is ended upon reaching the end value. This works in PHP 7.0.2 but works different starting from the PHP 7.0.3 and doesn't include the end value. Test script: --------------- $min = 0.2; $max = 5; print_r(range($min, $max, 0.2)); Expected result: ---------------- ( [0] => 0.2 [1] => 0.4 [2] => 0.6 [3] => 0.8 [4] => 1 [5] => 1.2 [6] => 1.4 [7] => 1.6 [8] => 1.8 [9] => 2 [10] => 2.2 [11] => 2.4 [12] => 2.6 [13] => 2.8 [14] => 3 [15] => 3.2 [16] => 3.4 [17] => 3.6 [18] => 3.8 [19] => 4 [20] => 4.2 [21] => 4.4 [22] => 4.6 [23] => 4.8 [24] => 5 ) Actual result: -------------- ( [0] => 0.2 [1] => 0.4 [2] => 0.6 [3] => 0.8 [4] => 1 [5] => 1.2 [6] => 1.4 [7] => 1.6 [8] => 1.8 [9] => 2 [10] => 2.2 [11] => 2.4 [12] => 2.6 [13] => 2.8 [14] => 3 [15] => 3.2 [16] => 3.4 [17] => 3.6 [18] => 3.8 [19] => 4 [20] => 4.2 [21] => 4.4 [22] => 4.6 [23] => 4.8 ) -- Edit bug report at https://bugs.php.net/bug.php?id=77674&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77674&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77674&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77674&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77674&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77674&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77674&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77674&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77674&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77674&r=support Expected behavior: https://bugs.php.net/fix.php?id=77674&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77674&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77674&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77674&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77674&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77674&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77674&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77674&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77674&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77674&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77674&r=mysqlcfg

« previous php.doc.bugs (#16432) next »