@@ -772,7 +772,6 @@ A function or method may be referenced in a way that creates a closure out of it
772772
773773If so, the ` ... ` MUST NOT include any whitespace before or after. That is, the correct format is ` foo(...) ` .
774774
775-
776775### 4.9 Property Hooks
777776
778777Object properties may also include hooks, which have a number of syntactic options.
@@ -897,10 +896,27 @@ class Example
897896}
898897```
899898
900- ## 4.10 Interface properties
899+ ## 4.10 Interface and abstract properties
901900
902901Abstract properties may be defined in interfaces or abstract classes, but are required to
903- specify if they must support ` get ` operations, ` set ` operations, or both.
902+ specify if they must support ` get ` operations, ` set ` operations, or both. In the case
903+ of abstract classes, they MAY include a body for one or another hook.
904+
905+ If there is a body for any hook, then the entire hook block MUST follow
906+ the same rules as for defined hooks above. The only difference is that
907+ a hook that has no body specified have a single semicolon after the hook
908+ keyword, with no space before it.
909+
910+ ``` php
911+ abstract class Example {
912+ abstract public string $name {
913+ get => ucfirst($this->name);
914+ set;
915+ }
916+ }
917+ ```
918+
919+ If there is no body for either hook, then the following rules apply:
904920
905921* The operation block MUST be on the same line as the property.
906922* There MUST be a single space between the property name and the operation block ` {} ` .
0 commit comments