note 87588 deleted from language.oop5.cloning by danbrown

From: Date: Thu, 11 Dec 2008 19:47:46 +0000
Subject: note 87588 deleted from language.oop5.cloning by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-148044@lists.php.net to get a copy of this message
Note Submitter: James ---- The wbcarts example has nothing to do with cloning and really should be removed. It's simply an example of using the static keyword. It is not a "fix" for "scaling up" cloning to thousands of entries. If data can truly be shared by all instances of a class, then make the data static. If not, then each instance needs a copy. Trying to do some form of "weak" sharing using static and then only accessing the instances that are using the static at that time is a sure way to end up with unmaintaintable code.

« previous php.notes (#148044) next »