Re: visibility + unserialization
| From: | Robert Cummings | Date: | Tue, 27 May 2008 15:46:15 +0000 |
| Subject: | Re: visibility + unserialization | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-274731@lists.php.net to get a copy of this message | ||
On Tue, 2008-05-27 at 08:40 -0700, Ted Wood wrote:
> Robert, thanks very much for your detailed explanation. This makes
> sense as I've wrapped my brain around protected and private property
> types.
>
> I think I'll be leaving them as public members for performance
> reasons. Down the road, I may add special handling for certain
> members
> that should be private and protected. The __sleep() and __wake()
> function should come in handy for that.
If you're moving your entire system over to PHP5, then a one time pass
through the database may be optimal. A simple loop to grab each record,
import it, re-serialize and save it should do the trick. And from my
brief test where I found private members have precedence over public
members, it seems it might be the most efficient solution also... in the
long term.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP