Bug #51731 [Com]: every numbers modulo by 4294967296.* will become 'division by zero' error
| From: | orangejasmine at hotmail dot com | Date: | Mon, 03 May 2010 20:17:29 +0000 |
| Subject: | Bug #51731 [Com]: every numbers modulo by 4294967296.* will become 'division by zero' error | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-150138@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=51731&edit=1
ID: 51731
Comment by: orangejasmine at hotmail dot com
Reported by: orangejasmine at hotmail dot com
Summary: every numbers modulo by 4294967296.* will become
'division by zero' error
Status: Bogus
Type: Bug
Package: Scripting Engine problem
Operating System: Windows XP SP3
PHP Version: 5.3.2
New Comment:
oh i see...
% operator converts operands to int
sorry for my misunderstanding
Previous Comments:
------------------------------------------------------------------------
[2010-05-03 21:39:37] pajoye@php.net
2^31 is the largest integer you can get on Windows.
------------------------------------------------------------------------
[2010-05-03 21:36:01] orangejasmine at hotmail dot com
sorry for a mistake
Expected result:
1
------------------------------------------------------------------------
[2010-05-03 21:29:01] orangejasmine at hotmail dot com
Description:
------------
every numbers modulo by 4294967296.* will become 'division by zero'
error
Test script:
---------------
<?php
echo 1 % 4294967295; // ok
echo 1 % 4294967297; // ok
echo 1 % 4294967296; // error
echo 1 % 4294967296.5; // error
?>
Expected result:
----------------
0
Actual result:
--------------
PHP Warning: Division by zero
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=51731&edit=1