explain $CI =& get_instance();
Asked 07 September, 2021
Viewed 2.5K times
  • 59
Votes

Looking through codeigniter's source code,

in its helper functions I keep seeing code $CI =& get_instance(); can anyone please explain to me how this code works?

I get that it is returning a reference to the $CI super object, but where does get_instance() come from?

6 Answer