|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2018-11-30 09:52 UTC] nikic@php.net
[2018-12-06 09:38 UTC] fkruidhof at mailbox dot org
-Status: Open
+Status: Closed
[2018-12-06 09:38 UTC] fkruidhof at mailbox dot org
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Oct 28 10:00:01 2025 UTC |
Description: ------------ The stack trace from an exception shows the wrong value of the parameter that was passed to a function if it's value is changed inside that function (before the exception is thrown). First bug report, novice PHP developer. Apologies if I miscategorized this report. Test script: --------------- <?php $variable = 'foo'; one($variable); function one($variable) { try { two($variable); } catch (Exception $e) { echo $e->getTraceAsString(); } } function two($variable) { $variable = 'bar'; throw new Exception('problem'); } Expected result: ---------------- Stack trace output: #0 /file.php(8): two('foo') #1 /file.php(3): one('foo') #2 {main} Actual result: -------------- Stack trace output: #0 /file.php(8): two('bar') #1 /file.php(3): one('foo') #2 {main}