xref: /PHP-8.2/Zend/tests/bug75420.7.phpt (revision f8d79582)
1--TEST--
2Bug #75420.7 (Indirect modification of magic method argument)
3--FILE--
4<?php
5class Test {
6    public function __set($x,$v) { $GLOBALS["name"] = 24; var_dump($x); }
7}
8
9$obj = new Test;
10$name = "foo";
11$name = str_repeat($name, 2);
12$obj->$name = 1;
13var_dump($name);
14?>
15--EXPECT--
16string(6) "foofoo"
17int(24)
18