#29738 [NEW]: percentages error
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
#29738 [Bgs]: percentages error
ID: 29738 User updated by: support at pulse-hosting dot com Reported By: support at pulse-hosting dot com Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux RedHat PHP Version: Irrelevant New Comment: Oops, I ment 10, the correct output should be 10 not 15. 25% of 40 is 10 Previous Comments: [2004-08-18 18:10:42] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. There is no "%() function" in PHP. Check appropriate part of the documentation: http://www.php.net/manual/en/language.operators.arithmetic.php [2004-08-18 17:40:33] support at pulse-hosting dot com 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 this bug report at http://bugs.php.net/?id=29738&edit=1
#29738 [Bgs]: percentages error
ID: 29738 User updated by: support at pulse-hosting dot com Reported By: support at pulse-hosting dot com Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux RedHat PHP Version: Irrelevant New Comment: oh sorry :P Previous Comments: [2004-08-18 18:17:18] support at pulse-hosting dot com Oops, I ment 10, the correct output should be 10 not 15. 25% of 40 is 10 [2004-08-18 18:10:42] [EMAIL PROTECTED] Sorry, but your problem does not imply a bug in PHP itself. For a list of more appropriate places to ask for help using PHP, please visit http://www.php.net/support.php as this bug system is not the appropriate forum for asking support questions. Thank you for your interest in PHP. There is no "%() function" in PHP. Check appropriate part of the documentation: http://www.php.net/manual/en/language.operators.arithmetic.php [2004-08-18 17:40:33] support at pulse-hosting dot com 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 this bug report at http://bugs.php.net/?id=29738&edit=1