3v4l.org

run code in 500+ PHP versions simultaneously
<?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'
Output for 8.3.5
Fatal error: Cannot use the abstract modifier on a property in /in/fuj6p on line 4
Process exited with code 255.

preferences:
39.37 ms | 493 KiB | 3 Q