#29738 [NEW]: percentages error
| From: | support at pulse-hosting dot com | Date: | Wed, 18 Aug 2004 15:40:34 +0000 |
| Subject: | #29738 [NEW]: percentages error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-64859@lists.php.net to get a copy of this message | ||
From: support at pulse-hosting dot com
Operating system: Linux RedHat
PHP version: Irrelevant
PHP Bug Type: Unknown/Other Function
Bug description: percentages error
Description:
------------
I can't seem to work out why, but the %() function doesn't always return
the right out. For example 25% (40); returns 25 yet 25% of 40 is 15. I've
checked and checked again and the error is on php's side and not mine.
Other percentages work yet some don't.
Reproduce code:
---------------
$sum = 25% (40);
echo "25% of 40 is ".$sum;
Expected result:
----------------
25% of 40 is 15
Actual result:
--------------
25% of 40 is 25
--
Edit bug report at http://bugs.php.net/?id=29738&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=29738&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=29738&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=29738&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=29738&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29738&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=29738&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=29738&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=29738&r=support
Expected behavior: http://bugs.php.net/fix.php?id=29738&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=29738&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=29738&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=29738&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29738&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=29738&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=29738&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=29738&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29738&r=float