#25689 [NEW]: RFE for: ceil() floor() functions
| From: | php at pgregg dot com | Date: | Mon, 29 Sep 2003 13:27:25 +0000 |
| Subject: | #25689 [NEW]: RFE for: ceil() floor() functions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-48255@lists.php.net to get a copy of this message | ||
From: php at pgregg dot com
Operating system: All
PHP version: Irrelevant
PHP Bug Type: Feature/Change Request
Bug description: RFE for: ceil() floor() functions
Description:
------------
RFE: modify ceil/floor functions so that they take a second optional
argument (default 1) that is the factor to which the number is rounded up
or down? e.g. you want to round up to the nearest 50? $x = ceil($y,
50);
currently you'd have to do: $x = intval(($y+49)/50)*50;
This would retain backward compatibility with all code as the default
value of 1 would mean that behaviour was the same.
--
Edit bug report at http://bugs.php.net/?id=25689&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25689&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25689&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25689&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25689&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25689&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25689&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25689&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25689&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25689&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25689&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25689&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25689&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25689&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25689&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25689&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25689&r=float