rfc:weak_maps
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:weak_maps [2019/11/04 21:04] – Explan difference nikic | rfc:weak_maps [2020/01/03 09:56] (current) – Implemented nikic | ||
---|---|---|---|
Line 3: | Line 3: | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
* Proposed Version: PHP 8.0 | * Proposed Version: PHP 8.0 | ||
- | * Status: | + | * Status: |
* Implementation: | * Implementation: | ||
Line 83: | Line 83: | ||
===== Vote ===== | ===== Vote ===== | ||
- | Add WeakMap class in PHP 8.0? Yes/No. | + | Voting started 2019-12-18 and closes 2020-01-01. |
+ | |||
+ | <doodle title=" | ||
+ | | ||
+ | | ||
+ | </ | ||
===== Differences to spl_object_id() and WeakReference ===== | ===== Differences to spl_object_id() and WeakReference ===== | ||
Line 95: | Line 100: | ||
* The value stored under the ID will not be released when the object is destroyed. | * The value stored under the ID will not be released when the object is destroyed. | ||
- | Using the '' | + | Using the '' |
<PHP> | <PHP> | ||
Line 114: | Line 119: | ||
</ | </ | ||
- | This makes use of the '' | + | This makes use of the '' |
+ | |||
+ | A native weak map implementation will instead remove the value from the weak map as soon as the object key is destroyed. |
rfc/weak_maps.1572901496.txt.gz · Last modified: 2019/11/04 21:04 by nikic