Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.php > #15481

PHP7 Stack Trace Mess

From Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de>
Newsgroups comp.lang.php
Subject PHP7 Stack Trace Mess
Date 2015-06-23 16:28 +0200
Organization albasani.net
Message-ID <mmbqe8$c2u$1@news.albasani.net> (permalink)

Show all headers | View raw


According to 
<https://github.com/php/php-src/blob/php-7.0.0alpha1/UPGRADING>, with 
PHP7...

| exception backtraces will no longer display the original value that
| was passed to a function and show the modified value instead. For
| example
|
| function foo($x) {
|     $x = 42;
|     throw new Exception;
| }
| foo("string");
|
| will now result in the stack trace
|
| Stack trace:
| #0 file.php(4): foo(42)
| #1 {main}
|
| while previously it was:
| Stack trace:
| #0 file.php(4): foo('string')
| #1 {main}

I fail to see any advantage in this change. It basically means that 
stack traces will be misleading, making debugging harder. While it may 
be simpler for the engine not having to "remember" the original values, 
I find a messed-up stack trace an unacceptably high price to pay for 
such an optimization (if that is indeed the reason).

How am I supposed to get correct stack trace information in PHP7?

Greetings,
Thomas

-- 
Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!
(Coluche)

Back to comp.lang.php | Previous | NextNext in thread | Find similar | Unroll thread


Thread

PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-23 16:28 +0200
  Re: PHP7 Stack Trace Mess Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2015-06-23 16:58 +0000
    Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-23 20:00 +0200
      Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-23 22:22 +0200
        Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-24 00:03 +0200
          Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-24 10:44 +0200
            Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-24 20:02 +0200
              Re: PHP7 Stack Trace Mess Matthew Carter <m@ahungry.com> - 2015-06-24 14:09 -0400
                Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-24 20:50 +0200
                Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-25 01:09 +0200
                Re: PHP7 Stack Trace Mess Matthew Carter <m@ahungry.com> - 2015-06-24 22:12 -0400
                Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-25 10:02 +0200
                Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-25 15:48 +0200
                Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-25 18:04 +0200
                Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-25 19:14 +0200
    Re: PHP7 Stack Trace Mess Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-23 22:07 +0200
      Re: PHP7 Stack Trace Mess "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-23 22:15 +0200
      Re: PHP7 Stack Trace Mess Stefan+Usenet@Froehlich.Priv.at (Stefan Froehlich) - 2015-06-24 06:13 +0000

csiph-web