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