blob: 9d1b7c963b19d19323acc10fc6b91e38f5941984 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
--TEST--
Bug #79108: Referencing argument in a function makes it a reference in the stack trace
--FILE--
<?php
function test(string $val) {
$a = &$val;
hackingHere();
print_r($val);
}
function hackingHere() {
// we're able to modify the $val from here, even though the arg was not a reference
debug_backtrace()[1]['args'][0] = 'Modified';
}
test('Original');
?>
--EXPECT--
Original
|