1--TEST--
2Nullsafe operator on $this
3--FILE--
4<?php
5
6class Test {
7    public $foo = 42;
8
9    public function method() {
10        var_dump($this?->foo);
11        var_dump($this?->bar());
12    }
13
14    public function bar() {
15        return 24;
16    }
17}
18
19$test = new Test;
20$test->method();
21
22?>
23--EXPECT--
24int(42)
25int(24)
26