$a = fn () => 1;
$b = fn () => function () use ($a) { echo $a(); }; // Error: use of unassigned variable '$a' PHP(PHP1412)
$b()(); // echoes `1`

This error should not be thrown, I think.
Using v1.17.10641 of PHP Tools extension.

thanks! I see, it's closure inside another closure right?

edit: inside arrow function fn()

    thank you! we have fixed this and preparing a pre-release today.

    Write a Reply...