Hi, On Fri, Jan 23, 2026 at 10:59 AM Benjamin Außenhofer <[email protected]> wrote: > I agree that relying on reference counting can bite you, but I still voted > Yes, because > > We only have reference counting to rely on in PHP as far as memory goes
For disposal, only if we decide so. The RFC proposes to introduce block scoping, and could have made the decision to deterministically dispose of values as they go out of scope. The RFC refers to similar features in Python and Hack, with the same basic syntax, both of which use reference counting as primary garbage collection mechanism, yet disposal is deterministic in this context. > and thats what people writing cleanup critical code rely on already. This > gives a much nicer syntax. In my experience, relying on this causes occasional bugs that are unusually difficult to address (and to avoid in the first place). > The future scope lists improvements as next steps, like the error when RC > 1 > or Disposable interfaces, this is a first step towards something that is > missing dearly. Unfortunately these improvements won't make it because they will be breaking changes. Best Regards, Arnaud
