Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
NationalPark
on Oct 23, 2020
|
parent
|
context
|
favorite
| on:
PHP 8: Before and After
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.
jozzy-james
on Oct 23, 2020
|
next
[–]
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
zapt02
on Oct 23, 2020
|
prev
|
next
[–]
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.
wolco2
on Oct 23, 2020
|
prev
|
next
[–]
Write to a database or file?
pampa
on Oct 23, 2020
|
prev
[–]
you mean $_SESSION? that was there since at least php4
mkopinsky
on Oct 25, 2020
|
parent
[–]
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: