# RFC: Add Logical Shifts for bitwise string operations

- Thread: https://externals.io/message/54005
- Original archive: https://news-web.php.net/php.internals/54005
- Started by Anthony Ferrara on 2011-07-17T23:47:47+00:00
- Messages: 3
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #54005 — Anthony Ferrara — 2011-07-17T23:47:47+00:00

URL: https://externals.io/message/54005#54005

Hello all,

I have added an RFC for the addition of logical bitwise shift
operators.  (>>> and <<< proposed).

https://wiki.php.net/rfc/logicalshiftoperator

Feedback welcome,

Thanks

Anthony

---

## #54007 — Rasmus Lerdorf — 2011-07-18T00:00:55+00:00

URL: https://externals.io/message/54005#54007 · In reply to: #54005

> Hello all,
> 
> I have added an RFC for the addition of logical bitwise shift
> operators.  (>>> and <<< proposed).
> 
> https://wiki.php.net/rfc/logicalshiftoperator
> 
> Feedback welcome,

Your RFC should probably address the issue that we already have a <<<
operator. See http://php.net/heredoc

-Rasmus

---

## #54008 — Anthony Ferrara — 2011-07-18T00:22:24+00:00

URL: https://externals.io/message/54005#54008 · In reply to: #54007

That's a very good point.  However it would be discernible by the
context.  If there's a literal or a variable to the left of the
operator, it'd be the shift operator (since any literal or variable
the left of the heredoc would result in a syntax error).  But it
should likely be more concrete.  Perhaps b<< or something else.

I'll update the RFC to leave the selection of an operator pair up for
discussion.

Thanks,

Anthony


> 
> > […]
>
> Your RFC should probably address the issue that we already have a <<<
> operator. See http://php.net/heredoc
>
> -Rasmus
