1--TEST--
2Extra named params in backtraces
3--FILE--
4<?php
5
6function test($a, ...$rest) {
7    var_dump(debug_backtrace());
8    debug_print_backtrace();
9    throw new Exception("Test");
10}
11
12try {
13    test(1, 2, x: 3, y: 4);
14} catch (Exception $e) {
15    var_dump($e->getTrace());
16    echo $e, "\n";
17}
18
19?>
20--EXPECTF--
21array(1) {
22  [0]=>
23  array(4) {
24    ["file"]=>
25    string(%d) "%s"
26    ["line"]=>
27    int(10)
28    ["function"]=>
29    string(4) "test"
30    ["args"]=>
31    array(4) {
32      [0]=>
33      int(1)
34      [1]=>
35      int(2)
36      ["x"]=>
37      int(3)
38      ["y"]=>
39      int(4)
40    }
41  }
42}
43#0 %s(10): test(1, 2, x: 3, y: 4)
44array(1) {
45  [0]=>
46  array(4) {
47    ["file"]=>
48    string(%d) "%s"
49    ["line"]=>
50    int(10)
51    ["function"]=>
52    string(4) "test"
53    ["args"]=>
54    array(4) {
55      [0]=>
56      int(1)
57      [1]=>
58      int(2)
59      ["x"]=>
60      int(3)
61      ["y"]=>
62      int(4)
63    }
64  }
65}
66Exception: Test in %s:%d
67Stack trace:
68#0 %s(%d): test(1, 2, x: 3, y: 4)
69#1 {main}
70