Welcome Guest, Not a member yet? Register   Sign In
Using $_SESSION vs $this->session

(09-30-2016, 03:18 PM)Cannondale Wrote: Question: Is using $_SESSION more efficient than using CI session class?

It would seem that using $_SESSION may be more efficient as it is already available to the controller, models and views.
However, if using the CI session class, the session library would need to be loaded in the constructor of every class referencing the session variables.

Is this accurate?

The session library can be autoloaded in the config so that it's always available.


Messages In This Thread
Using $_SESSION vs $this->session - by Cannondale - 09-30-2016, 03:18 PM
RE: Using $_SESSION vs $this->session - by whomikey - 09-30-2016, 03:58 PM
RE: Using $_SESSION vs $this->session - by Narf - 10-03-2016, 12:45 AM

Theme © iAndrew 2016 - Forum software by © MyBB