rfc:string-bitwise-shifts
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
rfc:string-bitwise-shifts [2014/04/14 23:56] – created daverandom | rfc:string-bitwise-shifts [2021/03/27 14:34] (current) – Move to inactive ilutov | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Your Title Here ====== | + | ====== PHP RFC: Normalize string bitwise shifts |
* Version: 0.1 | * Version: 0.1 | ||
* 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 ===== | ||
Line 28: | Line 32: | ||
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
- | A WIP branch | + | A WIP patch can be seen [[https:// |
- | + | ||
- | ===== Implementation ===== | + | |
- | After the project is implemented, | + | |
- | - the version(s) it was merged to | + | |
- | - a link to the git commit(s) | + | |
- | - a link to the PHP manual entry for the feature | + | |
===== References ===== | ===== References ===== |
rfc/string-bitwise-shifts.1397519787.txt.gz · Last modified: 2017/09/22 13:28 (external edit)