Re: final keyword
| From: | Felipe Pena | Date: | Wed, 13 Feb 2008 10:18:17 +0000 |
| Subject: | Re: final keyword | ||
| References: | 1 2 3 4 5 6 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-35442@lists.php.net to get a copy of this message | ||
Em Qua, 2008-02-13 às 10:59 +0100, Sebastian Schneider escreveu:
> By the way, when declared final the value couldn't be changed, anyways -
> however it MUST be read-only.
I made a ***simple*** (or wrong!) patch months ago for read-only
property as you described.
http://felipe.ath.cx/diff/readonly.patch
e.g.
class foo {
private readonly $foo = array(1, 2, 3);
}
But i agree with early discussions, and with Marcus' implementation:
http://marc.info/?l=php-internals&w=2&r=1&s=readonly&q=b