Skip to content

Conversation

AndreiDreyer
Copy link
Contributor

Added capturing for variables used in arrow closure expressions. Variables used in arrow closures that are not parameters passed to the arrow closure automatically capture the value of the variable outside the arrow closure

$foo = "foo";
fn () => $foo; // This captures the value of $foo outside the scope of the arrow closure

@AndreiDreyer AndreiDreyer requested a review from ml86 July 8, 2025 13:13
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.

2 participants