note 87588 added to language.oop5.cloning

From: Date: Thu, 11 Dec 2008 19:45:53 +0000
Subject: note 87588 added to language.oop5.cloning
Groups: php.notes 
Request: Send a blank email to php-notes+get-148043@lists.php.net to get a copy of this message
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. ---- Server IP: 69.147.83.197 Probable Submitter: 65.246.210.161 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.cloning.php Edit -- https://master.php.net/note/edit/87588 Del: integrated -- https://master.php.net/note/delete/87588/integrated Del: useless -- https://master.php.net/note/delete/87588/useless Del: bad code -- https://master.php.net/note/delete/87588/bad+code Del: spam -- https://master.php.net/note/delete/87588/spam Del: non-english -- https://master.php.net/note/delete/87588/non-english Del: in docs -- https://master.php.net/note/delete/87588/in+docs Del: other reasons-- https://master.php.net/note/delete/87588 Reject -- https://master.php.net/note/reject/87588 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#148043) next »