rfc:treat_enum_instances_as_values
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:treat_enum_instances_as_values [2023/04/28 21:44] – suitespacernd | rfc:treat_enum_instances_as_values [2023/04/28 21:52] – suitespacernd | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== PHP RFC: Your Title Here ====== | + | ====== PHP RFC: Treat Enum Instances as Values |
* Version: 0.1 | * Version: 0.1 | ||
* Date: 2023-04-28 | * Date: 2023-04-28 | ||
Line 39: | Line 39: | ||
| | ||
1 => ' | 1 => ' | ||
- | | + | 2 => ' |
3 => ' | 3 => ' | ||
]; | ]; | ||
Line 90: | Line 90: | ||
Could be a toggle if community desired | Could be a toggle if community desired | ||
- | ===== Open Issues ===== | ||
- | Make sure there are no open issues when the vote starts! | ||
- | |||
- | ===== Unaffected PHP Functionality ===== | ||
- | List existing areas/ | ||
- | |||
- | This helps avoid any ambiguity, shows that you have thought deeply about the RFC's impact, and helps reduces mail list noise. | ||
===== Future Scope ===== | ===== Future Scope ===== | ||
Line 118: | Line 111: | ||
public function offsetGet(Month $which){ | public function offsetGet(Month $which){ | ||
+ | //... | ||
+ | } | ||
+ | |||
+ | //... | ||
+ | } | ||
+ | class YourType implements ArrayAccess | ||
+ | //... | ||
+ | |||
+ | public function offsetGet($mixed $which){ | ||
//... | //... | ||
} | } | ||
Line 127: | Line 129: | ||
| | ||
+ | | ||
$x = $myobj[Color:: | $x = $myobj[Color:: | ||
+ | $y = $yourobj[Color:: | ||
Such a roadmap finally enables users to user to simply use match($this) and other userland syntactic sugar to simulate object keys. This gap can be further reduced and optimized from there. | Such a roadmap finally enables users to user to simply use match($this) and other userland syntactic sugar to simulate object keys. This gap can be further reduced and optimized from there. | ||
Line 133: | Line 137: | ||
===== Proposed Voting Choices ===== | ===== Proposed Voting Choices ===== | ||
- | Include these so readers know where you are heading and can discuss the proposed voting options. | + | A two-thirds majority is required for this proposal to be accepted. |
===== Patches and Tests ===== | ===== Patches and Tests ===== | ||
Line 143: | Line 147: | ||
===== References ===== | ===== References ===== | ||
- | A robust discussion about further pros/ | + | A robust discussion about further pros/ |
- | Mailing list introduction and opening RFC- https:// | + | https:// |
+ | |||
+ | Mailing list introduction and opening RFC- | ||
+ | https:// | ||
Mailing list post-RFC discussion: TBD | Mailing list post-RFC discussion: TBD | ||
===== Rejected Features ===== | ===== Rejected Features ===== | ||
None to date | None to date |
rfc/treat_enum_instances_as_values.txt · Last modified: 2023/04/29 11:04 by suitespacernd