Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69274 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 45100 invoked from network); 23 Sep 2013 14:52:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2013 14:52:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=krebs.seb@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=krebs.seb@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.178 as permitted sender) X-PHP-List-Original-Sender: krebs.seb@gmail.com X-Host-Fingerprint: 74.125.82.178 mail-we0-f178.google.com Received: from [74.125.82.178] ([74.125.82.178:62672] helo=mail-we0-f178.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id CE/50-43439-79550425 for ; Mon, 23 Sep 2013 10:52:07 -0400 Received: by mail-we0-f178.google.com with SMTP id u57so3171127wes.37 for ; Mon, 23 Sep 2013 07:52:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=qQLzeLnU+HMSMJdzqCXB/2bKGOOcD80S4ullLDaUI/Q=; b=cBIsJ5fQiIgXo5lpHzrXmRnJcvx4oSnx/FG+ueHFCctNGInUPZJ8ia6V3CJdPlUe7P RY3RQtxBvHS3jDHzbAXW+kvqZHeHQ6gemPk6+IuELKNTvXywfpbrsFVoLPq5N7SJxBYH ZHRdB0nLFM5nspVoZZL8mcVEhA2pnW+bcjphY2ocWM541SzDF/DHCa347jNsJqDD2FFh WekCtcCaASbW7AXNEUlzoV7eYfVVy0FyZIxvm53miWeocNmAp4+bJww/CrPcDRFdDSus voRhvrA6wvT1nU271HVnoUmTNMEh0zZ0f2enqtkuhBN4O+fxGaaYQvz0nkvRBgiQEanq lDGw== X-Received: by 10.180.211.206 with SMTP id ne14mr14006010wic.30.1379947920750; Mon, 23 Sep 2013 07:52:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.5.9 with HTTP; Mon, 23 Sep 2013 07:51:20 -0700 (PDT) In-Reply-To: <52404AB9.2070007@php.net> References: <52404AB9.2070007@php.net> Date: Mon, 23 Sep 2013 16:51:20 +0200 Message-ID: To: Joe Watkins Cc: PHP internals list , Lars Strojny Content-Type: multipart/alternative; boundary=001a11c37d44a0048204e70e29b4 Subject: Re: [PHP-DEV] RFC: Anonymous Classes From: krebs.seb@gmail.com (Sebastian Krebs) --001a11c37d44a0048204e70e29b4 Content-Type: text/plain; charset=ISO-8859-1 2013/9/23 Joe Watkins > On 09/23/2013 02:43 PM, Lars Strojny wrote: > >> Hi Joe, >> >> what about serialization for those classes? >> >> cu, >> Lars >> >> Am 23.09.2013 um 08:39 schrieb Joe Watkins : >> >> Morning All, >>> >>> https://wiki.php.net/rfc/**anonymous_classes >>> >>> I'd like to hear thoughts regarding the addition of anonymous >>> classes, patch included. >>> >>> Cheers >>> Joe >>> >>> -- >>> PHP Internals - PHP Runtime Development Mailing List >>> To unsubscribe, visit: http://www.php.net/unsub.php >>> >>> >> > Same as any other object; what you are creating is normal classes without > a (declared) name, nothing about the objects functionality has differs from > an object of a named class. > When you serialize an object the serialized form contains the class name. So as long as the instance doesn't have a own class name it isn't possible to serialize it properly and even further to unserialize it, because the whole definition is gone. To sum it up: They aren't serializable. Imo it isn't such a flaw, that anonymous instances aren't serializable, because anonymous functions/closures aren't neither. Regards, Sebastian. > > Cheers > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > > -- github.com/KingCrunch --001a11c37d44a0048204e70e29b4--