Jump to content

Question with php function


colap

Recommended Posts

function &getInstance($boot = true) {
	static $instance = array();
	if (!$instance) {
		if (!class_exists('Set')) {
			require LIBS . 'set.php';
		}
		$instance[0] =& new Configure();
		$instance[0]->__loadBootstrap($boot);
	}
	return $instance[0];
}

Why is & there? function &getInstance

And is it php4 syntax using the & ?$instance[0] =& new Configure();

Link to comment
https://forums.phpfreaks.com/topic/240397-question-with-php-function/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.