• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
what is the use of the ampersand added to the front of the function call

#1
[eluser]Unknown[/eluser]
Hi,
I read the CodeIgniter source code,found the is_loaded function defined in the Common.php file,as follow
function is_loaded($class = '')

And that function is called in Controller.php file:
$this->load->_base_classes =& is_loaded();
my question is why add the ampersand to is_loaded(),i think it is useless

#2
[eluser]InsiteFX[/eluser]
It creates a reference to that object.

PHP.net - Passing by Reference

InsiteFX


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.