I've been wondering this for a while now.
What are the differences between Joomla sessions and php sessions? Are they interchangeable?
JSession is based on the standard PHP session handling mechanism but I would not say they are interchangeable, as Joomla is directly "talking" to JSession and not to the super global.
In backend you select a session handler (the default being the database) where Joomla will store session related informations, basically it's serializing the content of
When a cookie is sent, no actual readable data is stored, just a session identifier.
It also provides a very simple, namespaced interface to store and retrieve data from the user session. Read an entire article about this on ostraining.
Joomla uses the PHP session functions to create its
JSession object, but it provides wrapper functions and namespaces the session to keep the data segregated. If you dump the PHP superglobal
$_SESSION you will see the Joomla session items.