-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PHP 8.0 | ControlStructures::hasBody(): add support for match express…
…ions PHP 8.0 introduced match expressions as an new control structure. While a `match` expression without body or with an empty body is not allowed and would result in a fatal error (or be interpreted as a non-global function call), the `ControlStructures::hasBody()` method should still handle it correctly. Includes adding the `T_MATCH` token to the `Collections::controlStructureTokens()` token array. Includes unit tests. Refs: * https://wiki.php.net/rfc/match_expression_v2
- Loading branch information
Showing
4 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters