Re: [PHP] Creating Objects!

2003-10-03 Thread Burhan Khalid
Webmaster wrote: let us say there is Class A. In the constructor of this class I create an Object B of Class B. Now what is the difference between these two ? this->B = new B; and B = new B; The "this" object always points to the current instance of an object. So whenever you refer to a variab

Re: [PHP] Creating Objects!

2003-09-23 Thread Evan Nemerson
Well in the first one the property of A named "B" will be an instance of B. In the second one a local variable in the constructor function named "B" which is an instance of B, and that variable will not be accessible from any function other than the constructor (unless you're playing w/ the refl

[PHP] Creating objects

2003-09-23 Thread Webmaster
Hi, let us say there is Class A. In the constructor of this class I create an Object B of Class B. Now what is the difference between these two ? this->B = new B; and B = new B; Thank you very much! Wenmaster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

[PHP] Creating Objects!

2003-09-23 Thread Webmaster
HI, let us say there is Class A. In the constructor of this class I create an Object B of Class B. Now what is the difference between these two ? this->B = new B; and B = new B; Thank you very much! Wenmaster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

[PHP] creating objects by reference?

2002-12-18 Thread Jonathan Sharp
Is it better to do: $obj = &new object(); verses: $obj = new object(); thanks, -js -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php