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