01-21-2008, 11:40 AM
|
#6 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
PHP might pass objects by reference automatically, but when I need the reference to a variable, I explicitly reference them, to make it more clear to me that I'm using a reference and not the object itself. And yes, this snippet:
Code:
$some_obj =& new TestClass();
would leave you with a fatal error and nothing more (because the object is just being created, it doesn't yet have a reference until the script steps through that line). My implementation doesn't throw any errors/warnings/notices, because the object is referenced correctly and exists in memory at that point.
Thanks for the feedback. So the system will stay 
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|