rfc:readonly_properties
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
rfc:readonly_properties [2014/10/24 00:16] – both read and write ajf | rfc:readonly_properties [2017/09/22 13:28] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PHP RFC: Readonly Properties ====== | ====== PHP RFC: Readonly Properties ====== | ||
- | * Version: 0.1 | + | * Version: 0.1.1 |
- | * Date: 2014-10-24 | + | * Date: 2014-10-24 |
* Author: Andrea Faulds, ajf@ajf.me | * Author: Andrea Faulds, ajf@ajf.me | ||
- | * Status: | + | * Status: |
+ | * Discussion: http:// | ||
* First Published at: http:// | * First Published at: http:// | ||
Line 54: | Line 55: | ||
This is proposed for the next major version of PHP, currently PHP 7. | This is proposed for the next major version of PHP, currently PHP 7. | ||
+ | ===== Future Scope ===== | ||
+ | |||
+ | Properties in interfaces are currently not supported. If they were later to be supported (perhaps with getters/ | ||
+ | |||
+ | <code php> | ||
+ | interface Point { | ||
+ | readonly $x, $y; | ||
+ | } | ||
+ | |||
+ | class ImmutablePoint implements Point { | ||
+ | public readonly $x, $y; | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | class MutablePoint implements Point { | ||
+ | public $x, $y; | ||
+ | ... | ||
+ | } | ||
+ | </ | ||
===== RFC Impact ===== | ===== RFC Impact ===== | ||
Line 97: | Line 117: | ||
===== Changelog ===== | ===== Changelog ===== | ||
+ | |||
+ | * v0.1.1 - Added Future Scope | ||
* v0.1 - Creatd | * v0.1 - Creatd |
rfc/readonly_properties.1414109775.txt.gz · Last modified: 2017/09/22 13:28 (external edit)