#29738 [Opn->Bgs]: percentages error

From: Date: Wed, 18 Aug 2004 16:10:43 +0000
Subject: #29738 [Opn->Bgs]: percentages error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-64864@lists.php.net to get a copy of this message
ID: 29738 Updated by: tony2001@php.net Reported By: support at pulse-hosting dot com -Status: Open +Status: Bogus Bug Type: Unknown/Other Function Operating System: Linux RedHat PHP Version: Irrelevant New Comment: 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 Previous Comments: ------------------------------------------------------------------------ [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

« previous php.bugs (#64864) next »