php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32352 Bit operator '<<' bug
Submitted: 2005-03-17 13:45 UTC Modified: 2005-03-17 13:53 UTC
From: mm at elec dot ru Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 4.3.10 OS: FreeBSD
Private report: No CVE-ID: None
 [2005-03-17 13:45 UTC] mm at elec dot ru
Description:
------------
Operation " 9000 << 18 " return incorrect result => "-1935671296"

Reproduce code:
---------------
$userid - get unsigned value from DB
$userid = 8000;
$base = $userid << 18;

Expected result:
----------------
-1935671296

Actual result:
--------------
2359296000

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-17 13:53 UTC] pajoye@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. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

You are out of the integer range. Check the php manual.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Wed Nov 05 19:00:01 2025 UTC