Skip to content

Commit 30297e4

Browse files
committed
remove short enums for now
1 parent 6664e9f commit 30297e4

1 file changed

Lines changed: 1 addition & 20 deletions

File tree

drafts/short-class.md

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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
1212
classes.
1313

1414
## Proposal
@@ -73,25 +73,6 @@ Attributes may also be used with short classes:
7373
class 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

9778
Inner classes are classes that are defined within another class.

0 commit comments

Comments
 (0)