1

I would like to understand if there's any performance diference when sending codeigniter superobject as a parameters instead of using and assigning get_instante() to a var ?

For example,

HELPERS:

function callMe($CI)
{
}

CONTROLLER:

callMe($this);

Instead of

HELPERS:

function callMe()
{
 $CI =& get_instance();
}

When I were typing this question I found get_instance() in Codeigniter: Why assign it to a variable? wish was very usefull, but I think this is a more specific question.

Community
  • 1
  • 1
punkbit
  • 7,347
  • 10
  • 55
  • 89

1 Answers1

0

There probably is a slight performance improvement, but there's no way it is significant enough to warrant using this ugly syntax requiring you pass another param every time you call a helper method.

Chris Schmitz
  • 8,097
  • 6
  • 31
  • 41