Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:76593 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 82032 invoked from network); 16 Aug 2014 23:51:30 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 16 Aug 2014 23:51:30 -0000 Authentication-Results: pb1.pair.com header.from=alexandru.aanei@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=alexandru.aanei@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.177 as permitted sender) X-PHP-List-Original-Sender: alexandru.aanei@gmail.com X-Host-Fingerprint: 74.125.82.177 mail-we0-f177.google.com Received: from [74.125.82.177] ([74.125.82.177:46152] helo=mail-we0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/71-65521-18EEFE35 for ; Sat, 16 Aug 2014 19:51:29 -0400 Received: by mail-we0-f177.google.com with SMTP id w62so3525455wes.8 for ; Sat, 16 Aug 2014 16:51:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Ww+cgtRkLKSROhfXmkbUjDHTcnDJ8Om6oyP4CJDY20w=; b=vxQpFSr/zlyDKtDBbP69aDUTqEwYpY1eKSo55BV6H+gQqa+GiASs0qA2xKoPQVE3OC Ki3upn92Ds3Jwrqc/WfFkspFo+Ckol3rTY/FjBUQt/qaDgxAtRwHjmy5vk8//JHwcxG3 0x0YsqxHN5YWUy48+UPqRlhZP2RBfWrOEI1+8pms6Ewd2Xwypfe9oWOTwOaVgppQ0Rav J49tJTFUL1Tv1L+Ooc2cj9/cTpCRUgVmTb4oYalNDurX54AgQNFKUz2kHq6e609t718J rco0/28sMw2z6DtpD2gMXLoX6Gbm0idQxe6Qe2h9ST/2cgrpLtJRcS607Ma8QlEmIyO7 +KXw== MIME-Version: 1.0 X-Received: by 10.180.184.133 with SMTP id eu5mr64813731wic.26.1408233086595; Sat, 16 Aug 2014 16:51:26 -0700 (PDT) Received: by 10.194.45.67 with HTTP; Sat, 16 Aug 2014 16:51:26 -0700 (PDT) Date: Sun, 17 Aug 2014 00:51:26 +0100 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=UTF-8 Subject: Exception stack trace string argument From: alexandru.aanei@gmail.com (Andu Aanei) 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. 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. 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 - The PHP version this feature should go in - A better name for the entry (and whether it should contain the "zend" prefix or not) - Does it require an RFC? I think it can be seen both as a bug and as a feature. 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