Bug #72002 [Opn->Wfx]: incorrect debug_backtrace() args

From: Date: Mon, 11 Apr 2016 23:33:21 +0000
Subject: Bug #72002 [Opn->Wfx]: incorrect debug_backtrace() args
References: 1  Groups: php.bugs php.qa 
Request: Send a blank email to php-bugs+get-200494@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=72002&edit=1 ID: 72002 Updated by: nikic@php.net Reported by: flip101 at gmail dot com Summary: incorrect debug_backtrace() args -Status: Open +Status: Wont fix Type: Bug Package: Testing related Operating System: Windows 10 64bits PHP Version: 7.0.5 Block user comment: N Private report: N New Comment: PHP 7 does not retain original arguments for performance reasons. This is intentional and will not be fixed. Previous Comments: ------------------------------------------------------------------------ [2016-04-11 15:39:25] flip101 at gmail dot com Description: ------------ On PHP 7.0.4 the args in debug_backtrace() do not give the correct arguments at the time of the call. Test script: --------------- <?php function foo($var) { array_shift($var); var_dump(debug_backtrace()); } $bar = ['a']; foo($bar); Expected result: ---------------- array(1) { [0]=> array(4) { ["file"]=> string(11) "test.php" ["line"]=> int(8) ["function"]=> string(3) "foo" ["args"]=> array(1) { [0]=> array(0) { [0]=> string(1) "a" } } } } Actual result: -------------- array(1) { [0]=> array(4) { ["file"]=> string(11) "C:\test.php" ["line"]=> int(8) ["function"]=> string(3) "foo" ["args"]=> array(1) { [0]=> &array(0) { } } } } ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=72002&edit=1

« previous php.bugs (#200494) next »