rfc:propertygetsetsyntax-alternative-typehinting-syntax
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:propertygetsetsyntax-alternative-typehinting-syntax [2013/01/20 15:19] – Add patch nikic | rfc:propertygetsetsyntax-alternative-typehinting-syntax [2013/01/20 15:21] – Add note on nullability of properties with accessors nikic | ||
---|---|---|---|
Line 102: | Line 102: | ||
Note that properties are '' | Note that properties are '' | ||
+ | |||
+ | Default values can only be used on the shorthand notation. If accessor methods are specified a default value can not be used. The only exception is the '' | ||
+ | |||
+ | <code php> | ||
+ | public DateTime $date = null { | ||
+ | get { ... } set { ... } | ||
+ | } | ||
+ | </ | ||
===== Benefits of the proposed syntax ===== | ===== Benefits of the proposed syntax ===== |
rfc/propertygetsetsyntax-alternative-typehinting-syntax.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1