Skip to content

Clarify fn keyword's usage as argument #55

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 8, 2022

Conversation

KorvinSzanto
Copy link
Contributor

This PR removes the "preceding space" requirement from the fn keyword used in short closures in order to allow using short closures as arguments without needing to include a preceeding space.

// Current spec:
foo( fn(int $x, int $y): int => $x + $y);

// After this PR:
foo(fn(int $x, int $y): int => $x + $y);

@theodorejb
Copy link
Contributor

Good catch. 👍

@KorvinSzanto KorvinSzanto merged commit 52a2d8e into php-fig:master Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants