rfc:propertygetsetsyntax-alternative-typehinting-syntax
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:propertygetsetsyntax-alternative-typehinting-syntax [2013/01/20 15:19] – Add patch nikic | rfc:propertygetsetsyntax-alternative-typehinting-syntax [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
* Date: 2013-01-04 | * Date: 2013-01-04 | ||
* Author: Nikita Popov < | * Author: Nikita Popov < | ||
- | * Status: | + | * Status: |
===== Introduction ===== | ===== Introduction ===== | ||
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 ===== | ||
Line 150: | Line 158: | ||
The patch for this proposal is available here: https:// | The patch for this proposal is available here: https:// | ||
+ | |||
+ | ===== Voting ===== | ||
+ | |||
+ | This proposal depends on the main accessors RFC. The result of this vote is only relevant if the main RFC is accepted. As this is a language change it requires a 2/3 majority. | ||
+ | |||
+ | <doodle title=" | ||
+ | * Yes | ||
+ | * No | ||
+ | </ | ||
+ | |||
+ | The vote ended 3 in favor, 12 against, as such this feature is declined. |
rfc/propertygetsetsyntax-alternative-typehinting-syntax.1358695150.txt.gz · Last modified: 2017/09/22 13:28 (external edit)