Skip to content

feat: allow multiline arrow functions #18500

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
test: add test
  • Loading branch information
xepozz committed May 4, 2025
commit 7c8f0eccd0a7150722c2dc771c2a0145fa428c78
13 changes: 13 additions & 0 deletions Zend/tests/arrow_functions/multiline_002.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--TEST--
Arrow functions implicit use must be throwing notices only upon actual use
--FILE--
<?php

$b = 1;

var_dump((fn() => {return $b + $c;})());

?>
--EXPECTF--
Warning: Undefined variable $c in %s on line %d
int(1)