File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,17 @@ print $p->fullName; // Prints "Peter Peterson"
6262 <title >Asymmetric Property Visibility</title >
6363
6464 <simpara >
65- Object properties may now have their <literal >set</literal > visibility controlled separately from the <literal >get</literal > visibility.
65+ Object properties may now have their <literal >set</literal > visibility
66+ controlled separately from the <literal >get</literal > visibility.
6667 </simpara >
6768 <informalexample >
6869 <programlisting role =" php" >
6970<![CDATA[
7071<?php
7172class Example
7273{
74+ // The first visibility modifier controls the get-visibility, and the second modifier
75+ // controls the set-visibility. The get-visibility must not be narrower than set-visibility.
7376 public protected(set) string $name;
7477
7578 public function __construct(string $name)
You can’t perform that action at this time.
0 commit comments