xref: /PHP-7.3/Zend/tests/bug75420.8.phpt (revision 502cfddf)
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