pate $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.
JakubMisek thanks! I see, it's closure inside another closure right? edit: inside arrow function fn()