1
0
mirror of https://github.com/php/php-src.git synced 2026-04-28 18:53:33 +02:00
Files
DanielEScherzer 618190127e Zend/tests: organize some tests with sub directories (8) (#17873)
Create new sub directories for tests related to backtraces and for tests
related to `$this` being reserved in different places and not being usable or
reassignable.

Work towards GH-15631
2025-02-22 19:10:59 +00:00

22 lines
406 B
PHP

--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