note 54112 deleted from language.oop.newref by nlopess

From: Date: Fri, 24 Jun 2005 09:03:47 +0000
Subject: note 54112 deleted from language.oop.newref by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-90878@lists.php.net to get a copy of this message
Note Submitter: karl at webartjapan dot com ---- Is it just me, or does this idea of new returning a copy by default seem counterintuitive? Indeed, this means that in order to be safe, I must ALWAYS use $a =& new whatever() when using someone else's library because they might have some hidden backreferences in the class. I come from a C++ and Java background, and the whole idea of not getting the same copy of an object as was available in the constructor (by default) just seems like an anthill waiting to happen.

« previous php.notes (#90878) next »