1--TEST-- 2Usage of property inside hook adds backing store 3--FILE-- 4<?php 5 6class Test { 7 public $prop1 { get => $this->prop1; } 8 public $prop2 { get => fn () => $this->prop2; } 9 public $prop3 { get => function () { return $this->prop3; }; } 10 public $prop4 { get => $this->prop1; } 11 public $prop5 { get {} } 12 public $prop6 { get { var_dump($this->prop6); } } 13 public $prop7 { get => new class { function test() { $this->prop7; } }; } 14} 15 16foreach ((new ReflectionClass(Test::class))->getProperties() as $prop) { 17 var_dump($prop->isVirtual()); 18} 19 20?> 21--EXPECT-- 22bool(false) 23bool(true) 24bool(true) 25bool(true) 26bool(true) 27bool(false) 28bool(true) 29