1--TEST--
2Recursion behavior of property hooks
3--FILE--
4<?php
5
6class Test {
7    public int $prop {
8        get { return $this->prop * 2; }
9        set { $this->prop = $value * 2; }
10    }
11
12    // Edge-case where recursion happens via isset().
13    public int $prop2 {
14        get { return isset($this->prop2); }
15        set { }
16    }
17}
18
19$test = new Test;
20$test->prop = 10;
21var_dump($test->prop);
22var_dump(isset($test->prop));
23var_dump(isset($test->prop2));
24var_dump($test);
25
26?>
27--EXPECT--
28int(40)
29bool(true)
30bool(true)
31object(Test)#1 (1) {
32  ["prop"]=>
33  int(20)
34  ["prop2"]=>
35  uninitialized(int)
36}
37