php.net |  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: 2021-06-09 16:41 UTC
Votes:3
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: cmb (profile)
Status: Wont fix Package: *General Issues
PHP Version: 5.4.0beta1 OS: any
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: dsnytkine at ultralogistics dot com
New email:
PHP Version: OS:

 

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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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));
}
 [2021-06-09 16:41 UTC] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2021-06-09 16:41 UTC] cmb@php.net
There appears to have little interest in this operator within
almost 10 years, so it seems like a won't fix.

If anybody is still interested in this, please pursue the RFC
process[1].

[1] <https://wiki.php.net/rfc/howto>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC