Read me better.
I was talking about "the web", read "HTTP Protocol" . The HTTP Protocol IS state-less.
Which impact the way you can program things
on the web.
Of course, you can do what you want if you
are the coder of a program executed
on the server (physical).
For instance, an Apache server doesn't need
to reload its configuration file each time
it serve an HTML page 🙂
The same goes for an interpreter of a language.
But normally, the interpreter is launch
more or less every time an PHP script is request,
it's not permanently in memory of the server.
But you can code your interpreter in such a way
it stays in memory permanently, like a daemon
or service, running in background.
If that's the case, then you can (could ?) do
what you ask, remembering things between two
"sessions", two running of scripts of whatever langage.
Hope it's more clear that way.
Regards,
Hervé.