$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()
fn()
Had this same issue as well
thank you! we have fixed this and preparing a pre-release today.