summaryrefslogtreecommitdiff
path: root/Zend/tests/bug72177_2.phpt
blob: 718d6c061e248f5087aba2379564364ec0bc724f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
--TEST--
Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
--FILE--
<?php
class Foo
{
    private $bar = 'bar';

    public function __construct()
    {
        unset($this->bar);
    }
}

class Bar extends Foo
{
    private $baz = 'baz';
    private static $tab = 'tab';

    public function __get(string $name)
    {
        var_dump($this->baz);
        var_dump(self::$tab);
        return $name;
    }
}

$r = new ReflectionProperty(Foo::class, 'bar');

$r->setAccessible(true);
echo "OK\n";
?>
--EXPECT--
OK