Hey Côme,
On Tue, 6 Aug 2024 at 11:05, Côme Chilliet <[email protected]> wrote:
>
> What does Proxy allows that Ghost do not?
>
Ghosts work well when you need to use the object identity, such as:
* $a === $b
checks
* spl_object_id(...)
* SplObjectStorage
Ghost objects operate at property level, and can only ever work with
concrete classes.
IMO, proxies can operate also at interface level (probably future scope),
and could be expanded to not need a concrete implementation until the
initialization callback is reached.
Marco Pivetta
https://mastodon.social/@ocramius
https://ocramius.github.io/