Welcome Guest, Not a member yet? Register   Sign In
global $CI; vs $CI=&get;_instance();
#2

[eluser]Pygon[/eluser]
The difference is nominal. Technically, global $CI would be faster (by an extremely small amount bordering on none), however exposing the global all over your script directly isn't very smart as this exposes it to things like UNSET or other overwriting of the entire variable, not just its contents.


Messages In This Thread
global $CI; vs $CI=&get;_instance(); - by El Forum - 04-01-2008, 11:32 AM
global $CI; vs $CI=&get;_instance(); - by El Forum - 04-01-2008, 01:02 PM
global $CI; vs $CI=&get;_instance(); - by El Forum - 04-01-2008, 01:06 PM
global $CI; vs $CI=&get;_instance(); - by El Forum - 04-01-2008, 01:16 PM



Theme © iAndrew 2016 - Forum software by © MyBB