Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@ For a `set` hook, if the argument name and type do not need to be redefined, the

If a hook consists of a single expression, then PHP allows it to be shortened using `=>`. In that case:

* There MUST be a single space on either side of the `=>` symbol.
* The body MUST begin on the same line as the hook name and `=>`.
* Wrapping is allowed if the expression used allows for wrapping, using the rules defined elsewhere in this document.

Expand Down Expand Up @@ -1302,8 +1301,10 @@ try {

Style rules for operators are grouped by arity (the number of operands they take).

When space is permitted around an operator, multiple spaces MAY be
used for readability purposes.
When space is permitted around an operator or the `=>` symbol, multiple spaces
MAY be used for readability purposes.

The `=>` symbol MUST be preceded and followed by at least one space.

All operators not described here are left undefined.

Expand Down Expand Up @@ -1528,8 +1529,6 @@ and principles as long closures above, with the following additions.

The `fn` keyword MUST NOT be succeeded by a space.

The `=>` symbol MUST be preceded and succeeded by a space.

The semicolon at the end of the expression MUST NOT be preceded by a space.

The expression portion MAY be split to a subsequent line. If so, the `=>` MUST be included
Expand Down