ID:               38548
 User updated by:  tstarling at wikimedia dot org
 Reported By:      tstarling at wikimedia dot org
-Status:           Bogus
+Status:           Open
 Bug Type:         Math related
 Operating System: Linux
 PHP Version:      4.4.4
 New Comment:

I couldn't confirm this personally, I tried a new build of 4.4.3 and
4.4.4 on linux, but didn't see the bug on either. Perhaps someone here
has an idea about how to reproduce it?


Previous Comments:
------------------------------------------------------------------------

[2006-08-22 17:50:43] [EMAIL PROTECTED]

# php -r 'var_dump(intval(0.9));'
int(0)
# php -v
PHP 4.4.5-dev (cli) (built: Aug 22 2006 21:48:33) (DEBUG)

Same result with 4.4.4, 4.4.3 and others.
Obviously such change could not happen, 'cause it would break lots of
tests.


------------------------------------------------------------------------

[2006-08-22 17:25:29] tstarling at wikimedia dot org

Description:
------------
We have a report on http://bugzilla.wikimedia.org/show_bug.cgi?id=7013
that in PHP 4.4.3 on linux, integer conversion rounds to the nearest
integer. This is a change from the previous behaviour, according to the
manual and in previous versions of PHP, integer conversion rounds down.
I don't see anything about this in the changelog, so I'm assuming the
problem persists in 4.4.4. 

Reproduce code:
---------------
intval(0.99)

Expected result:
----------------
0

Actual result:
--------------
1


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38548&edit=1

Reply via email to