xref: /php-src/ext/opcache/tests/jit/gh17151_2.phpt (revision cbe9d67e)
1--TEST--
2GH-17151: ZEND_FETCH_OBJ_R may modify RC of op1
3--FILE--
4<?php
5
6class C {
7    public static $prop;
8
9    public function __get($name) {
10        C::$prop = null;
11    }
12
13    public function __destruct() {
14        echo __METHOD__, "\n";
15    }
16}
17
18function test() {
19    C::$prop = new C();
20    C::$prop->bar;
21}
22
23test();
24echo "Done\n";
25
26?>
27--EXPECT--
28C::__destruct
29Done
30