Hi Yasuo, Yes, that looks like interesting idea. I can open another RFC and start working on that one, if there is a interest for that. Why can't we fit that into 7.2 ?
Cheers, 2017-01-17 10:12 GMT+01:00 Yasuo Ohgaki <yohg...@ohgaki.net>: > Hi Silvio, > > On Tue, Dec 13, 2016 at 6:17 PM, Silvio Marijić <marijic.sil...@gmail.com> > wrote: > >> After much thinking regarding array in immutable objects I'm thinking of >> revoking this RFC. If someone has some suggestion on that matter now is >> the >> time, but otherwise my work is done on this one. >> > > It may be good to start from constant scalars. > ES6 has "let" and "const". PHP has "const", but PHP's constant does not > have scope other than class. It would be nice if const can be used like JS. > > e.g. Following is syntax error. > <?php > function foo($v) { > const v=$v; > // Some complex code here. > return v * $var; > } > > var_dump(foo(123)); > ?> > > It would be large enough changes for 8.0, though. > > Regards, > > -- > Yasuo Ohgaki > yohg...@ohgaki.net > -- Silvio Marijić Software Engineer 2e Systems