Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:71268 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7500 invoked from network); 19 Jan 2014 10:07:02 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Jan 2014 10:07:02 -0000 Authentication-Results: pb1.pair.com smtp.mail=lester@lsces.co.uk; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=lester@lsces.co.uk; sender-id=unknown Received-SPF: error (pb1.pair.com: domain lsces.co.uk from 217.147.176.204 cause and error) X-PHP-List-Original-Sender: lester@lsces.co.uk X-Host-Fingerprint: 217.147.176.204 mail4.serversure.net Linux 2.6 Received: from [217.147.176.204] ([217.147.176.204:32903] helo=mail4.serversure.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 52/67-61840-4C3ABD25 for ; Sun, 19 Jan 2014 05:07:01 -0500 Received: (qmail 978 invoked by uid 89); 19 Jan 2014 10:06:57 -0000 Received: by simscan 1.3.1 ppid: 970, pid: 975, t: 0.0610s scanners: attach: 1.3.1 clamav: 0.96/m:52 Received: from unknown (HELO linux-dev4.lsces.org.uk) (lester@rainbowdigitalmedia.org.uk@81.138.11.136) by mail4.serversure.net with ESMTPA; 19 Jan 2014 10:06:57 -0000 Message-ID: <52DBA455.9050809@lsces.co.uk> Date: Sun, 19 Jan 2014 10:09:25 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 SeaMonkey/2.23 MIME-Version: 1.0 To: internals@lists.php.net References: <52DAEC41.7020107@php.net> In-Reply-To: Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: How to create Persistent zval? From: lester@lsces.co.uk (Lester Caine) Lin Yo-An wrote: > 3. if so, objects must be serialized to string? 'must' -> 'could' ... An object consists of a set of software to handle it which is persistent in so far as it exists in a certain version on the server, and an instance of the data created for that object ( or an 'array' of them ). Passing that data to later runs of the code can either be done by producing a 'static' serialization of the data, or a more flexible approach is store the data in a database. When the object is recreated it can either be repopulated from the serialization, or from the data. The first method requires that managing the data is handled directly by the objects code, while the second allows management from other paths. The first also introduces restrictions on how modifications can be applied as all stored serializations would need to be updated, while the second can simply create additional properties on the fly. Which method of persistence is used simply depends on other factors, and it's not uncommon for the serialized data to be stored in a database anyway. -- Lester Caine - G8HFL ----------------------------- Contact - http://lsces.co.uk/wiki/?page=contact L.S.Caine Electronic Services - http://lsces.co.uk EnquirySolve - http://enquirysolve.com/ Model Engineers Digital Workshop - http://medw.co.uk Rainbow Digital Media - http://rainbowdigitalmedia.co.uk