Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:100207 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 46933 invoked from network); 13 Aug 2017 20:44:41 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Aug 2017 20:44:41 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.47 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.47 mail-wm0-f47.google.com Received: from [74.125.82.47] ([74.125.82.47:36036] helo=mail-wm0-f47.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 33/43-34801-83AB0995 for ; Sun, 13 Aug 2017 16:44:41 -0400 Received: by mail-wm0-f47.google.com with SMTP id t201so25153495wmt.1 for ; Sun, 13 Aug 2017 13:44:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:references:from:to:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=i2pbxBTo1KKBRrQmiMkPnLp3iya+E9fE2Cw3oEPkvFA=; b=Mghd+rBlefexp1ya0tAY0ihvX4ui8UaAKVp4zNR/ukztqVEUrmC2RU1JBTc6NTG0c1 b6ritIkELjPyuPzXOQqnYkxwS4y50eZIu2cIhv7nXdi/cHk6zWn1gc5Weqp7qMmRohvS Xvf6UWLmKOc2BvVHvMVVPGnvt7wBqLhlZ0r1oUgTssQkjmVi906ML08O15Pn52X10ZYt acWUL1ADb4FuL/6TQryUCk0kxnHTqv59oc/KseW3CgV5Mdjx55Q2fEDOXuN+moDfl3hC 44y1n1w+hN2XJyYeAB+6hcCud0nuQVUGyVuUk9itmNcGnh4s1JVD09nNZbFAUu+/tfsW r1cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:references:from:to:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=i2pbxBTo1KKBRrQmiMkPnLp3iya+E9fE2Cw3oEPkvFA=; b=ZqQXvoVVCCNxKRW5KJaWb77VjNBQzppsq1zSaZBalBvbS4oAhL/FCIo+qg/rlRCV64 KCLxGBZujcXN1msH8YIwLTpWrOAjPVDHOgMg6ovWyL9mez8z4avq1GuA72GsiNeYLV2e KijLlipRSMgP0I3IKiAA/5LxHJ3hLmQ4YzXQZ1djswF2m4spnZOIkveRmQxCwzR2aKBZ bmyXRFH7FHofrrz4U/vPL2qBKQX6sjuRJdMXsszVWWEaoWMwgWMznCJowovvvJtrEWAb 7UjriFdMq94nFsq58xhRBwGifVywD1CwbgxwzivnR7zNrbTq5XPWNyOMqmIk5t0WMjbu Gdrw== X-Gm-Message-State: AHYfb5jOAj6m/1F8q7RplCOhjQc3s2zcG4xQCsKWlnjn/f4L+XGlncCu CPhuz38mnI1NU/Yi X-Received: by 10.28.216.66 with SMTP id p63mr3559014wmg.17.1502657077052; Sun, 13 Aug 2017 13:44:37 -0700 (PDT) Received: from ?IPv6:2a00:23c4:4bd2:6e00:797f:d36e:5760:10ee? ([2a00:23c4:4bd2:6e00:797f:d36e:5760:10ee]) by smtp.googlemail.com with ESMTPSA id e76sm4020005wmd.36.2017.08.13.13.44.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Aug 2017 13:44:35 -0700 (PDT) References: <7e336645-7b47-2772-257a-a51b6849e4b5@gmail.com> To: PHP Internals Message-ID: <6537e000-3ceb-9b51-9ce6-7d1b8f33318c@gmail.com> Date: Sun, 13 Aug 2017 21:44:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.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] Stop Exceptions capturing object references for trace arguments From: rowan.collins@gmail.com (Rowan Collins) On 13/08/2017 15:31, Niklas Keller wrote: > > If it's explicitly needed, someone could still just call > `debug_backtrace()` and manually store the args in the exception > constructor, no? That depends exactly how it's being used, but yes if you control the throw site or Exception constructor you could grab the backtrace manually. > > Would the args still be available in the stringified version? Because > they're quite useful for debugging there. Hm, I guess we'd need to store the string representation (the class name, basically) somewhere so we could keep that. Doesn't seem like it ought to be too hard, unless there's some hidden complexity or performance impact there. Regards, -- Rowan Collins [IMSoP]