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