From:             [EMAIL PROTECTED]
Operating system: Debian GNU/Linux (pool)
PHP version:      4.2.3
PHP Bug Type:     *Math Functions
Bug description:  round() doesn't always work

In a simple script consisting a single line like 
<? round(195.583,2); ?>
round() produces a proper output. However in one of my scripts, where
round() is used inside a method of a sophisticated object, it gives the
folowig results:
echo round(195.583, 2); -> 195
echo round(195.583, 1); -> 195
echo round(195.583, 0); -> 195
echo round(195.583, -1); -> 200
echo round(195.583, -2); -> 200

I use PHP4.2.3 with Apache 1.3.26, both of them are original Debian's
binaries. I have reproduced this behaviour on several machines.


-- 
Edit bug report at http://bugs.php.net/?id=20693&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=20693&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=20693&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=20693&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=20693&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=20693&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=20693&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=20693&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=20693&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=20693&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=20693&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=20693&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=20693&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=20693&r=isapi

Reply via email to