rfc:normalize-array-auto-increment-on-copy-on-write
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:normalize-array-auto-increment-on-copy-on-write [2019/06/19 23:09] – wesnetmo | rfc:normalize-array-auto-increment-on-copy-on-write [2019/06/28 21:13] (current) – wesnetmo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Normalize | + | ====== PHP RFC: Normalize |
* Version: 0.1 | * Version: 0.1 | ||
* Date: 2019-06-19 | * Date: 2019-06-19 | ||
* Author: Wes (@WesNetmo) | * Author: Wes (@WesNetmo) | ||
- | * Status: Under Discussion | + | * Status: Under discussion |
* First Published at: http:// | * First Published at: http:// | ||
Line 18: | Line 18: | ||
</ | </ | ||
- | This is currently not guaranteed, and because of '' | + | This is currently not guaranteed, and because of '' |
possible to always enforce this property -- but it should be in some dangerous cases, | possible to always enforce this property -- but it should be in some dangerous cases, | ||
namely when functions from (potential) different authors are interacting. | namely when functions from (potential) different authors are interacting. | ||
Line 26: | Line 26: | ||
When an '' | When an '' | ||
due to the copy-on-write behavior, it will result in an '' | due to the copy-on-write behavior, it will result in an '' | ||
- | way to the original one; in fact, the copy will also cover the " | + | way to the original one, inclusive of its " |
<PHP> | <PHP> | ||
Line 44: | Line 44: | ||
</ | </ | ||
- | This behavior | + | |
- | receive " | + | This happens also between different |
- | but that in reality are not, because they were misused during their lifetime (for example, | + | '' |
- | it was used '' | + | reality are not, because they were misused during their lifetime (classic |
+ | used '' | ||
As result of that, despite "copy on write", | As result of that, despite "copy on write", | ||
Line 97: | Line 98: | ||
be considered a bug-fix, rather than a behavior change; it offers protection against | be considered a bug-fix, rather than a behavior change; it offers protection against | ||
'' | '' | ||
- | and thus will only affect code that should be improved | + | and thus will only affect code that is already |
- | " | + | the " |
<PHP> | <PHP> | ||
Line 113: | Line 114: | ||
// $b is [0 => 2], rather than [2 => 2] | // $b is [0 => 2], rather than [2 => 2] | ||
</ | </ | ||
+ | |||
+ | The proposed change would make the behavior consistent and safer. | ||
===== Proposed PHP Version(s) ===== | ===== Proposed PHP Version(s) ===== | ||
Line 122: | Line 125: | ||
Vote will require 2/3 majority | Vote will require 2/3 majority | ||
+ | ===== References | ||
+ | |||
+ | * [[https:// |
rfc/normalize-array-auto-increment-on-copy-on-write.1560985762.txt.gz · Last modified: 2019/06/19 23:09 by wesnetmo