source: src/router/php7/Zend/tests/bug72177_2.phpt @ 31874

Last change on this file since 31874 was 31874, checked in by brainslayer, 4 months ago

update php

File size: 538 bytes
Line 
1--TEST--
2Bug #72177 Scope issue in __destruct after ReflectionProperty::setValue()
3--FILE--
4<?php
5class Foo
6{
7    private $bar = 'bar';
8
9    public function __construct()
10    {
11        unset($this->bar);
12    }
13}
14
15class Bar extends Foo
16{
17    private $baz = 'baz';
18    private static $tab = 'tab';
19
20    public function __get(string $name)
21    {
22        var_dump($this->baz);
23        var_dump(self::$tab);
24        return $name;
25    }
26}
27
28$r = new ReflectionProperty(Foo::class, 'bar');
29
30$r->setAccessible(true);
31echo "OK\n";
32?>
33--EXPECT--
34OK
Note: See TracBrowser for help on using the repository browser.