Reputation: 958
Is there a way of storing variables in a PHP application in the session scope or the application scope...? At the same time can someone please explain the life cycle of a php program..? Thanx...
Upvotes: 0
Views: 828
Reputation: 157839
life cycle of a php program is very short.
It's not like a desktop application constantly running in your browser, and not even a demon with persistent connection to your desktop application. It's more like a command line utility - doing it's job and exits. It runs discrete:
That's why you need sessions - to save the variables between calls.
Upvotes: 0
Reputation: 22152
Upvotes: 1