Hi guys,

If I have an object that has another object as a variable (eg, a dbConn
object), then I create another object and pass this dbConn in the
constructor, if that second class sets that arg to it's own variable, is it
true in 4.3.1 that they will NOT be sharing the same object reference?

I this I think is different in the zend 2.0 engine - see here:

http://www.zend.com/images/press/Feb_2003-4_Zeev_PHP5.pdf

But anyway, if I want each of the 2 classes to each point to the same dbConn
object, does that mean I have to write the constructor as

function secondClass(&$dbConn)
{
    $this->db = $dbConn;
}


?

cheers,
neko



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to