Re: [RFC] Readonly Properties
| From: | Patrick Schaaf | Date: | Fri, 24 Oct 2014 08:41:38 +0000 |
| Subject: | Re: [RFC] Readonly Properties | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-78295@lists.php.net to get a copy of this message | ||
Am 24.10.2014 01:36 schrieb "Andrea Faulds" <ajf@ajf.me>:
>
> Here’s another RFC:
> https://wiki.php.net/rfc/readonly_properties
+1 for the general feature, I'd love to have that available.
I have an idea regarding the additional keyword, with a small implication
(improvement) to the functionality provided, but at the cost of being
slightly quirky :) The idea is:
public $foo as private;
public $bar as protected;
protected $baz as private;
where the "as X" gives the writability scope. This introduces no new
keywords, and is currently not valid syntax, as far as I can see.
best regards
Patrick