#30315 [Bgs]: big integers don't overflow
| From: | tokul at users dot sourceforge dot net | Date: | Mon, 04 Oct 2004 06:58:12 +0000 |
| Subject: | #30315 [Bgs]: big integers don't overflow | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-67069@lists.php.net to get a copy of this message | ||
ID: 30315
User updated by: tokul at users dot sourceforge dot net
Reported By: tokul at users dot sourceforge dot net
Status: Bogus
Bug Type: Variables related
Operating System: Linux
PHP Version: 5.0.2
New Comment:
Have you checked php behaviour in other php versions?
I have also tested 4.1.2, 4.3.9 and 5.0.1. This happens only on 5.0.2.
I just need to know, if this is a bug or default behaviour in future
php versions.
Previous Comments:
------------------------------------------------------------------------
[2004-10-04 08:39:49] derick@php.net
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.
.
------------------------------------------------------------------------
[2004-10-03 21:35:01] tokul at users dot sourceforge dot net
Description:
------------
If big number (2500072158) is converted to integer, php 5.0.2 does not
overflow and uses max integer value (2147483647).
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
Is this standard future php behaviour or just some error in my config?
Reproduce code:
---------------
echo (int)0xde120495;
Expected result:
----------------
-569244523
Actual result:
--------------
2147483647
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=30315&edit=1