[question] Shared Objects
hakuno opened this issue · comments
Seiji 誠 次 commented
Hey!
I read the docs.
I've a question at here https://container.thephpleague.com/3.x/definitions/ concerning Shared Objects.
We can tell a definition to only resolve once and return the same instance every time it is resolved.
Do the Shared Objects preserve their internal data persisted in memory?
Is that like Singleton? Can I rely on that and update the data?
I need to update the data and keep using it.
Thanks!
Phil Bennett commented
An object is always by reference so yes it will persist data during a single request/process.