CodeIgniter Forums
What about this syntax? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: What about this syntax? (/showthread.php?tid=10905)



What about this syntax? - El Forum - 08-18-2008

[eluser]jbawarren[/eluser]
So I was looking at the Codeigniter code and ran across an oddly placed ampersand.

In common.php

The function:
function &load;_class($class, $instantiate = TRUE)

The instance:
$error =& load_class('Exceptions');

What exactly does the ampersand do here?

Sorry if it's a beginner question, I'm just curious...and new Smile

Thanks.


What about this syntax? - El Forum - 08-18-2008

[eluser]m4rw3r[/eluser]
See Returning references
and Refereces in the PHP manual.


What about this syntax? - El Forum - 08-18-2008

[eluser]jbawarren[/eluser]
Thanks m4rw3r,

That will do Smile