Check if Symfony PHP session has been started

Here’s how you can check if a session in Symfony was started:

Not a big fan of session variables, but used for non-sensitive session data, I think sessions are still useful.  After all, if you only want certain behaviors on your website tailored to a customer apply only while their browser is open on your site, this is an efficient way to pass certain settings and values along with a small footprint since all sessions go to garbage upon the visitor’s browser being closed.


Aaron Belchamber has written 244 articles

Leave a Reply

Your email address will not be published. Required fields are marked *