note 110846 added to language.operators.bitwise

From: Date: Fri, 14 Dec 2012 03:15:55 +0000
Subject: note 110846 added to language.operators.bitwise
Groups: php.notes 
Request: Send a blank email to php-notes+get-192524@lists.php.net to get a copy of this message
Just a note regarding negative shift values, as the documentation states each shift is an integer multiply or divide (left or right respectively) by 2. That means a negative shift value (the right hand operand) effects the sign of the shift and NOT the direction of the shift as I would have expected. FE. 0xff >> -2 results in 0x0 and 0xff << -2 result in 0xFFFFFFFFC0000000 (dependant on PHP_INT_MAX) ---- Server IP: 69.147.83.199 Probable Submitter: 125.162.134.91 ---- Manual Page -- http://php.net/manual/en/language.operators.bitwise.php Edit -- https://master.php.net/note/edit/110846 Del: integrated -- https://master.php.net/note/delete/110846/integrated Del: useless -- https://master.php.net/note/delete/110846/useless Del: bad code -- https://master.php.net/note/delete/110846/bad+code Del: spam -- https://master.php.net/note/delete/110846/spam Del: non-english -- https://master.php.net/note/delete/110846/non-english Del: in docs -- https://master.php.net/note/delete/110846/in+docs Del: other reasons-- https://master.php.net/note/delete/110846 Reject -- https://master.php.net/note/reject/110846 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192524) next »