File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99## Introduction
1010
11- This RFC proposes a new short syntax for class/enum definitions in PHP and the ability to embed these classes within other
11+ This RFC proposes a new short syntax for class definitions in PHP and the ability to embed these classes within other
1212classes.
1313
1414## Proposal
@@ -73,25 +73,6 @@ Attributes may also be used with short classes:
7373class Password(#[SensitiveParameter] string $password);
7474```
7575
76- ### Short enums
77-
78- Enums are a common pattern in PHP applications and are usually simple data structures that hold a set of constants.
79- This RFC includes a proposal for short enums:
80-
81- ``` php
82- enum Color(Red, Green, Blue);
83- ```
84-
85- This is equivalent to the following full enum definition:
86-
87- ``` php
88- enum Color {
89- case Red;
90- case Green;
91- case Blue;
92- }
93- ```
94-
9576### Inner Classes
9677
9778Inner classes are classes that are defined within another class.
You can’t perform that action at this time.
0 commit comments