Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:68308 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62007 invoked from network); 25 Jul 2013 19:47:55 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2013 19:47:55 -0000 Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.179 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.214.179 mail-ob0-f179.google.com Received: from [209.85.214.179] ([209.85.214.179:42287] helo=mail-ob0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C3/97-05798-9E081F15 for ; Thu, 25 Jul 2013 15:47:54 -0400 Received: by mail-ob0-f179.google.com with SMTP id xk17so2407446obc.24 for ; Thu, 25 Jul 2013 12:47:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=jNe6OplZGqJ1ruukY/zsddRIfaB6B5iHgmIhAIqmFrA=; b=TzIwowqBRdQQwg5kZQA7+A7JxBM4G+N3aCFxywAoydee7CShWTwXZm1JsOwK8Vlrg3 KDLj21v2bZ3ZwGKDsJAVjEEtXrfYkeMnkX6oeCfCgc/jnbBE8ZMnD1vTsv/chOcr+lDM pxCIz0+/1Z6mDBkEkMZyKXCHP36LsaaTEfNEIY4iIt1OpkG+fPj27bMfCyt0b2m0pJ41 BH9WqumxmyyfS3NVN+92fbPFsUo318d+IvNwuJMAL8zIWZXtmro7cYAHd6rxnOAkYSYt YqnvSowUX/0CDxAJXy7SlKTvWP/XZqJHlwy5ExT+pcebC5X2y1GtSQG5sTXOiotQC4co LtKw== MIME-Version: 1.0 X-Received: by 10.60.144.69 with SMTP id sk5mr44847454oeb.0.1374781671250; Thu, 25 Jul 2013 12:47:51 -0700 (PDT) Received: by 10.182.89.170 with HTTP; Thu, 25 Jul 2013 12:47:51 -0700 (PDT) In-Reply-To: <51F177E7.3020103@sugarcrm.com> References: <51F177E7.3020103@sugarcrm.com> Date: Thu, 25 Jul 2013 21:47:51 +0200 Message-ID: To: Stas Malyshev Cc: Jakub Zelenka , PHP internals list , "nikic@php.net" Content-Type: multipart/alternative; boundary=047d7b3a7f8028a08104e25b4d3a Subject: Re: [PHP-DEV] New handler for retrieving properties when object is serialized From: nikita.ppv@gmail.com (Nikita Popov) --047d7b3a7f8028a08104e25b4d3a Content-Type: text/plain; charset=ISO-8859-1 On Thu, Jul 25, 2013 at 9:09 PM, Stas Malyshev wrote: > Hi! > > > It's useful in situation if you only need to change properties for > > serialization. It's very similar to get_debug_info that is used only in > > specific situations (print_r...) > > Isn't __sleep already doing this? > __sleep returns an array of object property *names* to be serialized. Using __sleep you can restrict the set of serialized properties, but the properties still need to exist. Nikita --047d7b3a7f8028a08104e25b4d3a--