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