Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:87318 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87463 invoked from network); 27 Jul 2015 14:13:01 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 27 Jul 2015 14:13:01 -0000 Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.170 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 209.85.212.170 mail-wi0-f170.google.com Received: from [209.85.212.170] ([209.85.212.170:35536] helo=mail-wi0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C2/A0-17059-B6C36B55 for ; Mon, 27 Jul 2015 10:13:00 -0400 Received: by wibxm9 with SMTP id xm9so114694568wib.0 for ; Mon, 27 Jul 2015 07:12:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=i94JmIqRz1CWhpbuQZP//VVBli944JHzzFt/p74qcUY=; b=EJ72qlG39NX8eNwrtKC8MAJje+aJ/Uw5XNsvQSfK2oV1r9dH0f/b9k0zePYpbayxSQ aDm6BhgquapT45c+Em1+wyeDQrXOZxEIg7UkxWF68xOPnNh7afgHzujtgyznTrQZoE12 NS/7mAzjzdpGU3eZz2uAUxcQF4YD5e1LTZYrNdnapOoiUjBGJFwjn0rjMEN4Oqeqoxg3 sf7YXTAvogez7+gUPyAQ+NFkiI14AAAWDfQT5H78ZFI5IPDR8VH/X8KWVKHGIIHD0CAA 9WkmcChmFFNljjdCjsliJVbrYEE4gbW82rmDcy68/SsFrTnLvMwhPjFNhkBlKF19ecig 30tg== X-Received: by 10.194.238.193 with SMTP id vm1mr54560874wjc.57.1438006377459; Mon, 27 Jul 2015 07:12:57 -0700 (PDT) Received: from [192.168.0.136] ([62.189.198.114]) by smtp.googlemail.com with ESMTPSA id be9sm28115205wjb.26.2015.07.27.07.12.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Jul 2015 07:12:56 -0700 (PDT) To: internals@lists.php.net References: <550FA2ED.6080000@gmail.com> Message-ID: <55B63C55.20903@gmail.com> Date: Mon, 27 Jul 2015 15:12:37 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] Re: Serializing exceptions From: rowan.collins@gmail.com (Rowan Collins) Stas Malyshev wrote on 27/07/2015 08:08: > Since discussion on this did not lead to a definite conclusion, but I did > not hear from anybody that they need serialized exceptions, and we keep > getting bug reports about exception serialization and various issues > triggered by it, I propose this change: > https://github.com/php/php-src/pull/1442 I agree that this is better than the status quo - although I would still prefer stripping out the 'args' from the exception backtrace, which has other benefits for predictable destructors etc. Out of interest, is there any way to over-ride a denied serialization like this, using __sleep or Serializable? At the moment, you can create serializable sub-classes of exception, and retain a summarised copy of the backtrace: http://3v4l.org/IHPI5 It's not a big deal either way - in the rare cases where serialization of exception data is necessary, you could just write a wrapper to extract the public details - but I'm interested if my current hack will be adaptable if this change is applied. Regards, -- Rowan Collins [IMSoP]