A free and open-source book on Zend Framework for beginners


15.5. Summary

PHP sessions is a useful feature allowing you to store some data between page requests. PHP engine stores session data on server in form of files, and uses browser cookies to identify the same visitor the next time and load his session data to memory. For example, you can remember the user and show him personalized pages. The session doesn't last forever - it expires in some time.

Zend Framework provides a convenient wrapper around PHP sessions. With this wrapper, you can store data in session containers in object-oriented way. ZF3 also provides security features allowing to automatically validate session and prevent hacker attacks.


Top