On Sat, Dec 27, 2025 at 9:14 PM Ilija Tovilo <[email protected]> wrote:
>
> On Fri, Dec 26, 2025 at 4:41 PM Khaled Alam <[email protected]> wrote:
>
> > Inspired by Zig's "defer", it schedules a block to run when the current 
> > function exits (return, exception, or natural end), executed in LIFO order, 
> > aimed at safer cleanup without repetitive try/finally scaffolding.

Oh, and what I forgot to mention here (but not in the PR), there are
two recent RFCs that try to solve a very related problem.

- https://wiki.php.net/rfc/optin_block_scoping
- https://wiki.php.net/rfc/context-managers

Ilija

Reply via email to