<?php
abstract class A {
abstract public $x { get; }
}
class C extends A {
private $_x;
public $x {
get => $this->_x;
}
}
var_dump((new ReflectionProperty(C::class, 'x'))->isVirtual()); // should be: bool(true)
$c = new C;
$c->x = 3; // should throw an error: 'Property C::$x is read-only'