rfc:string-bitwise-shifts
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:string-bitwise-shifts [2014/04/15 00:00] – daverandom | rfc:string-bitwise-shifts [2021/03/27 14:34] (current) – Move to inactive ilutov | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Date: 2014-04-15 | * Date: 2014-04-15 | ||
* Author: Chris Wright, daverandom@php.net | * Author: Chris Wright, daverandom@php.net | ||
- | * Status: | + | * Status: |
* First Published at: https:// | * First Published at: https:// | ||
Line 10: | Line 10: | ||
===== Proposal ===== | ===== Proposal ===== | ||
- | TODO | + | Currently, bitwise shift operations on strings are performed by converting the string to an integer and returning an integer. This behaviour does not match that of the other bitwise operators when they are used with string operands, as these perform the operation on a byte-by-byte basis, and return a string. |
+ | |||
+ | This RFC proposes that the behaviour of the bitwise shift operators be altered, such that when the left operand is a string the shift operation is performed on the byte values of the string' | ||
+ | |||
+ | TODO: Add some example use cases | ||
===== Backward Incompatible Changes ===== | ===== Backward Incompatible Changes ===== |
rfc/string-bitwise-shifts.txt · Last modified: 2021/03/27 14:34 by ilutov