-
Notifications
You must be signed in to change notification settings - Fork 72
Closed
Description
When an arrow function is parsed, the body part is placed into a block instead of an expression. This might be not very important when analyzing PHP code but when it comes to recreating the PHP from the AST, it actually is a problem because a block would be enclosed in braces, while the expression in the arrow function is not. So, it has to be worked around with a hack.
The function body should be an expression rather than a block, as described in the documentation: https://www.php.net/manual/en/functions.arrow.php
Metadata
Metadata
Assignees
Labels
No labels