Re: Wired constant expression syntax and bug
| From: | Alexey Zakhlestin | Date: | Mon, 30 Jun 2014 19:17:11 +0000 |
| Subject: | Re: Wired constant expression syntax and bug | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-75150@lists.php.net to get a copy of this message | ||
On 30 Jun 2014, at 23:06, Dmitry Stogov <dmitry@zend.com> wrote:
> I'm wondered why you introduced this wired syntax in PHP-5.6.
>
> class FooBar {
> const bar = ["bar" => 3]["bar"];
> }
>
> It wasn't a part of RFC, it wasn't covered by tests, and it actually
> doesn't make a lot of sense. May be it's better to remove it?
Does it harm?
This example doesn’t make much sense, but intention of such code is unambiguous. It is clear what
should happen.
So, I’m +0 to leave it if tests are written.
--
Alexey Zakhlestin
CTO at Grids.by/you
https://github.com/indeyets
PGP key: http://indeyets.ru/alexey.zakhlestin.pgp.asc
Attachment: [application/pgp-signature] Message signed with OpenPGP using GPGMail signature.asc
Attachment: [application/pgp-signature] Message signed with OpenPGP using GPGMail signature.asc