Your oppinion counts
View Single Post
01-21-2008, 11:40 AM
Join Date: Dec 2007
Location: Bucharest, Romania
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:
$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.
View Public Profile
Send a private message to xenon
Visit xenon's homepage!
Find More Posts by xenon