rfc:property_accessors
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:property_accessors [2021/05/04 14:04] – nikic | rfc:property_accessors [2022/04/28 09:30] (current) – Fix typos ilutov | ||
---|---|---|---|
Line 363: | Line 363: | ||
</ | </ | ||
- | Specifying the same accessor multiple | + | Specifying the same accessor multiple |
=== By-reference getter === | === By-reference getter === | ||
Line 387: | Line 387: | ||
</ | </ | ||
- | These indirect | + | These indirect |
However, indirect array modification, | However, indirect array modification, | ||
Line 565: | Line 565: | ||
public int|string $covariant { get; } | public int|string $covariant { get; } | ||
// This property is useless, but will serve for the sake of illustration. | // This property is useless, but will serve for the sake of illustration. | ||
- | public int|string $contravariant { set {} } | + | public int|string $contravariant { set { /* ... */ } } |
} | } | ||
Line 951: | Line 951: | ||
// Illegal: Default value on property with explicit accessors. | // Illegal: Default value on property with explicit accessors. | ||
public $prop = "" | public $prop = "" | ||
- | get {} | + | get { /* ... */ } |
} | } | ||
} | } |
rfc/property_accessors.1620137055.txt.gz · Last modified: 2021/05/04 14:04 by nikic