Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47069 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39924 invoked from network); 1 Mar 2010 10:10:59 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Mar 2010 10:10:59 -0000 Authentication-Results: pb1.pair.com smtp.mail=j.boggiano@seld.be; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=j.boggiano@seld.be; sender-id=pass Received-SPF: pass (pb1.pair.com: domain seld.be designates 209.85.212.42 as permitted sender) X-PHP-List-Original-Sender: j.boggiano@seld.be X-Host-Fingerprint: 209.85.212.42 mail-vw0-f42.google.com Received: from [209.85.212.42] ([209.85.212.42:44732] helo=mail-vw0-f42.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B0/23-16552-2B29B8B4 for ; Mon, 01 Mar 2010 05:10:58 -0500 Received: by vws7 with SMTP id 7so938091vws.29 for ; Mon, 01 Mar 2010 02:10:55 -0800 (PST) Received: by 10.220.123.21 with SMTP id n21mr3038162vcr.14.1267438254268; Mon, 01 Mar 2010 02:10:54 -0800 (PST) Received: from ?192.168.80.150? (77-58-249-88.dclient.hispeed.ch [77.58.249.88]) by mx.google.com with ESMTPS id 37sm28551745vws.20.2010.03.01.02.10.51 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Mar 2010 02:10:53 -0800 (PST) Message-ID: <4B8B92A6.4060100@seld.be> Date: Mon, 01 Mar 2010 11:10:46 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b2pre Thunderbird/3.0.1 MIME-Version: 1.0 To: Tjerk Meesters CC: Herman Radtke , "internals@lists.php.net" References: <4B8A97AF.3060608@seld.be> <4bcbf4711002281200u409f041dm330a328eb546e039@mail.gmail.com> <1199A1E8-7663-4A1F-ACEB-1D2B77569BAE@gmail.com> In-Reply-To: <1199A1E8-7663-4A1F-ACEB-1D2B77569BAE@gmail.com> X-Enigmail-Version: 1.0.1 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig64BBD2A5928A99F9DF0F09EC" Subject: Re: [PHP-DEV] Unserialize is broken From: j.boggiano@seld.be (Jordi Boggiano) --------------enig64BBD2A5928A99F9DF0F09EC Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 01.03.2010 10:31, Tjerk Meesters wrote: > If visibility is an issue why not just use json_enode/decode for this > case then?it doesn't seem like a typical enough problem to be solved > low-level and json seems fast enough for the job ;-) Honestly I personally don't care, it won't happen to me again, I know it now, but I want it to be fixed for the benefit of others. Sure it's a rare case, but if you're gonna pretend it's ok that objects have ghost properties set to them that are unreadable, I guess there is no point in discussing this further. Should I btw remind you that the following results in a Fatal error: Cannot redeclare Test::$foo ? class Test { protected $foo; public $foo; } So it's illegal, but let's do it anyway because in php core it's funny to do weird stuff that doesn't make any sense? And in any case json_encode doesn't work the same at all since it doesn't encode protected properties, and doesn't store the object type, so it'd be much more work. Cheers, Jordi --------------enig64BBD2A5928A99F9DF0F09EC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuLkqkACgkQQxhJaNG8+ieHeQCfXm1JqNOfDAlZF5FKALGsffUN fjQAn2hiSQth35TEuIffl0uPj/zJh8/P =FgZQ -----END PGP SIGNATURE----- --------------enig64BBD2A5928A99F9DF0F09EC--