Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

No, I'm talking about the kind of thing that provides a `Context`-like object that allows the application developer to share memory between requests.


that's not really a thing you do in PHP, outside of frameworks like swoole/roadrunner. by nature it's a fire/execute/die shared-nothing model


Like others have mentioned, there is no such thing in PHP. Each request is handled individually from a blank slate and the context is destroyed when the request finishes.


Write to a database or file?


you mean $_SESSION? that was there since at least php4


And even that is limited to sharing data for a single user between requests. It's hard to accidentally share data between users.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: