Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47063 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 51953 invoked from network); 28 Feb 2010 19:35:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 28 Feb 2010 19:35:41 -0000 Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 209.85.220.223 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 209.85.220.223 mail-fx0-f223.google.com Received: from [209.85.220.223] ([209.85.220.223:54492] helo=mail-fx0-f223.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D4/AD-36353-C85CA8B4 for ; Sun, 28 Feb 2010 14:35:40 -0500 Received: by fxm23 with SMTP id 23so65873fxm.23 for ; Sun, 28 Feb 2010 11:35:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=ltZpDMNsVVg5x/FO1bA7Z9UOiWpSKvpmuFptedVuKvg=; b=oW0C550egLjojvuydNUVFrDD1czpLYNNntlwO+1/32d44cseknTLJHFEmoQAulxPbI 03PV0xN0vS5jp3X9j6q/SjFtUZy5wYp6jckb/6SG4eYpTtCoJwU5iUMygPPut+BPpTmM OPqdRDwvs1TLgmnm266YPG3ljvFfuBVsQqV9o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; b=xqVRZovzSrWhqkB03jF42Fb1hMrAGaYjGlFolmZCdKySFUSSlQldkpUkLqetVJSBdY QUb2cgZgOYgkxnJcymqHO2W4wOr1yFkpfXoPsKFmD20ktmGVladd0pwXexa/K+o7sF+t m2Lwwkxm/V+ccL0s8xOjbBUlAQPJhSLeacuyQ= MIME-Version: 1.0 Received: by 10.223.17.92 with SMTP id r28mr3858147faa.91.1267385736322; Sun, 28 Feb 2010 11:35:36 -0800 (PST) Reply-To: RQuadling@googlemail.com In-Reply-To: References: <4B8A97AF.3060608@seld.be> Date: Sun, 28 Feb 2010 19:35:15 +0000 Message-ID: <10845a341002281135w686664eej484e0686010bd1d6@mail.gmail.com> To: Herman Radtke Cc: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [PHP-DEV] Unserialize is broken From: rquadling@googlemail.com (Richard Quadling) On 28 February 2010 19:03, Herman Radtke wrote: >> Imo unserialize should check, when applying public or protected values, >> if either exists on the object, and apply it to the one that exists. >> Sure it's gonna cost some performance, but at least changing the >> prototype of your class while stuff is running isn't going to kill your >> code anymore. > > This seems like a corner case and one that a conversion script should > handle. =C2=A0Considering that serialize and unserialize are called for > every single web-request, degrading the performance of unserialize is > not something that should be done lightly. > > > > -- > Herman Radtke > hermanradtke@gmail.com | http://hermanradtke.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > As serializing reports protected and private properties, would it not be right that unserialize should work within the private scope of an object and then follow the same rules as userland code. It would guess that unserialize really doesn't need to know the visibility or at least shouldn't be creating properties based upon those visibilities but rather applying the values to the existing properties. --=20 ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp Zend Certified Engineer : http://zend.com/zce.php?c=3DZEND002498&r=3D213474= 731 ZOPA : http://uk.zopa.com/member/RQuadling