File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -579,13 +579,19 @@ public function process(string $algorithm, &...$parts)
579579}
580580```
581581
582- ### 4.6 ` abstract ` , ` final ` , and ` static `
582+ ### 4.6 Modifier keywords
583583
584- When present, the ` abstract ` and ` final ` declarations MUST precede the
585- visibility declaration.
584+ Properties and methods of a class have numerous keyword modifiers that alter how the
585+ engine and language handles them. When present, they MUST be in the following order:
586586
587- When present, the ` static ` declaration MUST come after the visibility
588- declaration.
587+ * Inheritance modifier: ` abstract ` or ` final `
588+ * Visibility modifier: ` public ` , ` protected ` , or ` private `
589+ * Scope modifier: ` static `
590+ * Mutation modifier: ` readonly `
591+ * Type declaration
592+ * Name
593+
594+ All keywords MUST be on a single line, and MUST be separated by a single space.
589595
590596``` php
591597<?php
@@ -594,7 +600,9 @@ namespace Vendor\Package;
594600
595601abstract class ClassName
596602{
597- protected static $foo;
603+ protected static readonly string $foo;
604+
605+ final protected int $beep;
598606
599607 abstract protected function zim();
600608
You can’t perform that action at this time.
0 commit comments