Do you consider this a bug? How are you relying on these overflown numbers?

Andi

At 12:50 PM 10/4/2004 +0200, M. Sokolewicz wrote:
You might want to ask this on the internals list (cc'd)

Tomas Kuliavas wrote:
When php 5.0.2 converts float to integer, it uses biggest possible integer
value. Other php versions overflow and use negalive integers.
How to reproduce it:
echo (int)0xde120495;
Expected result (php 5.0.1, 4.3.9 and 4.1.2):
----------------
-569244523
Actual result (only php 5.0.2):
--------------
2147483647
Is this a standard behaviour of all future php versions or some error in php?
OS details: Linux Debian Sarge
PHP compilation details (vanilla php-5.0.2.tar.bz2):
./configure --disable-debug --with-apxs=/somepath/apache/bin/apxs
--prefix=/somepath/php
--with-config-file-path=/somepath/
--with-pcre-regex --enable-mbstring --enable-session --disable-all
--with-gettext=shared,/usr
php.ini details:
error_reporting=E_ALL
display_errors=on
register_globals=off
asp_tags=on
short_tags=off
Please CC to my email.

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php

-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to