I’m not quite sure how to use PHP references yet or why would one want to use them. They are declared by using the ampersand character (&). Here’s the PHP Manual link.
I’ve come across reference usage in a few WordPress plug-ins and even use it mine. This I kind of understand. The reference was being set on the $this variable within an object like so &$this. What this is doing is setting up a reference to the current object so you will be using the current object rather than creating a new instance of the object. So far I’ve only seen this used in the function parameter of a WordPress function within an object. Here’s an example using the activation hook:
register_activation_hook( dirname(__FILE__) . ‘/connections.php’, array(&$this, ‘activate’) );
The second parameter is normally where you would set the function name as a string to call when the plug-in is activated. If I understand correctly, since my plug-in is an object I’m setting up a reference to my plug-in and the function to call within the array. If anyone can clear this up for me it’d be very appreciated.