Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:64578 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 36102 invoked from network); 5 Jan 2013 23:47:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jan 2013 23:47:40 -0000 Authentication-Results: pb1.pair.com header.from=enumag@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=enumag@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.83.48 as permitted sender) X-PHP-List-Original-Sender: enumag@gmail.com X-Host-Fingerprint: 74.125.83.48 mail-ee0-f48.google.com Received: from [74.125.83.48] ([74.125.83.48:59805] helo=mail-ee0-f48.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 53/2E-62408-A9BB8E05 for ; Sat, 05 Jan 2013 18:47:39 -0500 Received: by mail-ee0-f48.google.com with SMTP id b57so8861718eek.35 for ; Sat, 05 Jan 2013 15:47:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:content-type:to:cc:subject:references:date:mime-version :content-transfer-encoding:from:message-id:in-reply-to:user-agent; bh=rD2rXuXpXyw6aowAzDPBboXd0WhoWnctfAr5hvh3PFU=; b=zNQ00MbKOm+sXO9g6pHFulSugVKDFM2IDcLwvrJoykb1o39FNV6Y7/s8cmNEHC8W3L 6EoEmd6LCc0N0oRTgmcZ6/nPVJmOKLlwb9SDi8mDDT7VMoReIltGRXJIqVUEdDbPIEtg WWmwZC2/NKmby4gvl2wAEXhvKfXl94whO40hQu1+iKtM7mpJMkT9ShjEZP/tZYuwGUvP Sf8V13/uZIUGr+OB56lQIiXFqLUnS95WmcPyzlydKw8ZfDhNkN8O7A/RNMI4z/ZhruQ/ 8fzFh+xyjl/pvm8mjsmmmW+Y+6ZfO+422JF/+7U5STy3529JLgyisaWoyEj5cuGGlgBi 8T2g== X-Received: by 10.14.214.132 with SMTP id c4mr154574716eep.18.1357429654444; Sat, 05 Jan 2013 15:47:34 -0800 (PST) Received: from jachym-pc (ip-89-176-75-69.net.upcbroadband.cz. [89.176.75.69]) by mx.google.com with ESMTPS id e2sm120528784eeo.8.2013.01.05.15.47.33 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 05 Jan 2013 15:47:33 -0800 (PST) Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: "Stas Malyshev" Cc: "internals@lists.php.net" References: <50E742A7.9010909@sugarcrm.com> <50E8A99F.5000900@sugarcrm.com> <50E8BA82.5000700@sugarcrm.com> Date: Sun, 06 Jan 2013 00:47:20 +0100 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-ID: In-Reply-To: <50E8BA82.5000700@sugarcrm.com> User-Agent: Opera Mail/12.11 (Win32) Subject: Re: [PHP-DEV] How to get a PHP bug fixed? From: enumag@gmail.com (=?utf-8?B?SsOhY2h5bSBUb3XFoWVr?=) I don't understand. There already IS the 'args' field where huge objects also can be (and very often are). The new 'object' field does not make any difference in this regard. Dne Sun, 06 Jan 2013 00:42:58 +0100 Stas Malyshev napsal(a): > Hi! > >> Are you sure there should be the $options parameter? It would not >> save any memory because the trace needs to be pregenerated >> regardless. Back compatibilty clearly doesn't need to be that strict >> in this case because for example in case of debug_backtrace function >> the 'object' fields where added in 5.1.1 (not in 5.1.0!) and were >> enabled by default (there wasn't even a way to disable them - that >> came with 5.2.5). > > Lacking it will mean that the output of this function will be huge and > frequently impossible to properly display without filtering, as objects > tend to be huge and complex. So you won't be able to do > var_export($e->getTrace()) anymore and get something useful. The whole > point of having those args in other backtrace function is to make them > easily useful in logs, etc. without additional filtering. So yes, I > think the parameter would be useful there. Actually, adding it without a > parameter may very well break some apps that casually do something like: > > catch(Exception $e) { > $this->log->debug("Caught exception, backtrace: > ".var_export($e->getTrace(), true)); > } > > Since the whole trace will be loaded into memory and that may cause > out-of-memory condition if the object in question aggregates tons of > other objects. > Besides that, for consistency reasons it may be useful that all > backtrace functions would have the same options. > That may mean we'd have to post-process the result of getTrace, but it > should not be too hard to do... > >> With that in mind there is no need for the $options parameter in my >> opinon. Which meens the only thing missing is the tests, right? > > Tests would be good in any case.