#40439 [Com]: bit shift error

From: Date: Mon, 12 Feb 2007 06:29:04 +0000
Subject: #40439 [Com]: bit shift error
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-108705@lists.php.net to get a copy of this message
ID: 40439 Comment by: judas dot iscariote at gmail dot com Reported By: xris01 at free dot fr Status: Open Bug Type: Unknown/Other Function Operating System: Debian 3.1 PHP Version: 5.2.1 New Comment: /sapi/cli/php foo.php -36839245760 64 bit system and 0 in 32 bit system here. Previous Comments: ------------------------------------------------------------------------ [2007-02-12 00:36:54] xris01 at free dot fr Description: ------------ When using bit shifting (shift left) operation in 5.2.1, result is different (and false) compared to 5.1.6 Reproduce code: --------------- $z = -2302452860; $lr_z = (($z) << 4); echo $lr_z; Expected result: ---------------- 1815459904 Actual result: -------------- 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40439&edit=1

« previous php.bugs (#108705) next »