|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #55872 Zero filled right-shift
Submitted: 2011-10-08 13:27 UTC Modified: -
Avg. Score:3.7 ± 1.9
Reproduced:2 of 3 (66.7%)
Same Version:1 (50.0%)
Same OS:1 (50.0%)
From: dsnytkine at ultralogistics dot com Assigned:
Status: Open Package: *General Issues
PHP Version: 5.4.0beta1 OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
12 + 16 = ?
Subscribe to this entry?

 [2011-10-08 13:27 UTC] dsnytkine at ultralogistics dot com
Please implement a zero-filled right-shift similar to Java and JavaScript >>> 
operator. It is really useful in some situations. 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-23 22:28 UTC] zyss at mail dot zp dot ua
You can use this function meantime (performance sucks anyway):

// 32-bit zero-filled right-shift
function zrsh($a, $n) {
  if ($n <= 0) return $a;
  $b = 0x80000000;
  return ($a >> $n) & ~($b >> ($n - 1));
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Wed Nov 25 20:01:23 2020 UTC