1--TEST--
2Attempted read/write of virtual property backing value throws
3--SKIPIF--
4<?php
5if (!function_exists('zend_test_zend_call_stack_get')) die("skip zend_test_zend_call_stack_get() is not available");
6?>
7--EXTENSIONS--
8zend_test
9--INI--
10; The test may use a large amount of memory on systems with a large stack limit
11memory_limit=2G
12--FILE--
13<?php
14
15class Test {
16    public $prop {
17        get => $this->getProp();
18        set {
19            $this->setProp($value);
20        }
21    }
22
23    private function getProp() {
24        return $this->prop;
25    }
26
27    private function setProp($value) {
28        $this->prop = $value;
29    }
30}
31
32$test = new Test;
33
34try {
35    $test->prop = 0;
36} catch (Error $e) {
37    echo $e->getMessage(), "\n";
38}
39
40try {
41    var_dump($test->prop);
42} catch (Error $e) {
43    echo $e->getMessage(), "\n";
44}
45
46?>
47--EXPECTF--
48Maximum call stack size of %d bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?
49Maximum call stack size of %d bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?
50