Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76595 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 85538 invoked from network); 17 Aug 2014 00:20:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 17 Aug 2014 00:20:06 -0000 Authentication-Results: pb1.pair.com smtp.mail=are.you.winning@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=are.you.winning@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.216.170 as permitted sender) X-PHP-List-Original-Sender: are.you.winning@gmail.com X-Host-Fingerprint: 209.85.216.170 mail-qc0-f170.google.com Received: from [209.85.216.170] ([209.85.216.170:54099] helo=mail-qc0-f170.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 70/22-65521-135FFE35 for ; Sat, 16 Aug 2014 20:20:03 -0400 Received: by mail-qc0-f170.google.com with SMTP id x3so3614943qcv.15 for ; Sat, 16 Aug 2014 17:19:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=s6KD20S7cdw/9U2BgQO4WK/2Z2FkAct2gvyC02lK+bY=; b=EFAEWfn+iIfo7/TteLsEPi/BvKn8sZa21UOQoxGRPN5Am+tUg4wWl/puhGAf5AKsb9 Ux/LcpBs/quXUfMSedQcZxzpvpN+SiyNJPqxeKjR5MTzQhenkeBJHzeqnqRU8E0ClDhN CpDakx25uR78AvJNILTn79wyE+je6zRaBZSEx93EAokrso3XR05G0T9muXXAIoaJFk8i OKyvx4f34RZyZMaFTrr5lwwyoeuN06oPO14IeoVBncm5VGuobAcrDVBw/AOL2zKobhWB xqrA4IA35Ag0UUDjCsldveNtEftmjNSUX/NYZEHs8wUbtDZJUyf73Y5O/TWZV2HvJNia 3GwA== MIME-Version: 1.0 X-Received: by 10.140.105.37 with SMTP id b34mr40155741qgf.1.1408234799015; Sat, 16 Aug 2014 17:19:59 -0700 (PDT) Sender: are.you.winning@gmail.com Received: by 10.229.64.196 with HTTP; Sat, 16 Aug 2014 17:19:58 -0700 (PDT) In-Reply-To: References: Date: Sun, 17 Aug 2014 01:19:58 +0100 X-Google-Sender-Auth: vvDdopXDDskzfzfVtBtVnyCguc4 Message-ID: To: Andu Aanei Cc: "internals@lists.php.net" Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] Exception stack trace string argument From: cw@daverandom.com (Chris Wright) On 17 August 2014 00:51, Andu Aanei wrote: > Hi, > > I am writing this message in order to ask for feedback and advice > regarding a small feature I wish to implement in the engine. > > Currently, when an exception is thrown in a function which has one or > more string arguments, > the stack trace shows only the first 15 characters of those arguments. > This can be annoying and can make debugging harder. +1 > If, for example, a function throws an exception because of a path to a > file or a namespace > passed as a parameter, the developer has to guess the value of that > argument in order to determine what has caused the exception. > > I therefore propose adding an entry in php.ini for specifying the > maximum length of a string argument in the stack trace. > For example, zend.stacktrace_str_arg_len > If the entry is not specified in php.ini, then the default (and > current) value of 15 will be assigned. > I guess there are multiple benefits to removing that magic number. This should have PHP_INI_ALL changeability or it's not that useful IMO > Everything I have mentioned above is (will be) implemented by me. > > If my idea is valid and the reactions are positive, I would also > appreciate some suggestions such as: > - Minimum and maximum value for the parameter Min 0, max unbounded > - The PHP version this feature should go in 5.7 (assuming it happens, failing that 7) - although that said I personally would be fine with it going into a 5.6.x point release as it won't affect production for anyone with a sane development cycle/environment. > - A better name for the entry (and whether it should contain the > "zend" prefix or not) No useful opinion > - Does it require an RFC? I think it can be seen both as a bug and as a feature. Yes, this is more feature than bugfix IMO > It is probably worth mentioning that this is my first attempt at > making an open source contribution of this kind and I'm relatively new > to the process. > > > > Cheers, > Andu > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >