Property in interface cannot be explicitly abstract.

Description

While PHP 8.4 supports properties in an interface, as long as they are defining hooks, it is not possible to use explicitly the option abstract.

Example

<?php

interface I {
    abstract $p { get; }
}

?>

Solutions

  • Remove the option abstract. May be use public instead.

  • Move the property definition to an abstract class.