Edit report at https://bugs.php.net/bug.php?id=72002&edit=1
ID: 72002 Updated by: ni...@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 -- PHP Quality Assurance Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php