News for hackers. Stuff that matters.
Re:Upcoming changes in PHP 7.1 by maaaats on Monday May 23, 2016 @06:19AM (#11752898)
Re:Upcoming changes in PHP 7.1 by pori on Monday May 23, 2016 @06:55AM (#11753015)
My favorite feature is definitely the square bracket destructuring syntax. This is great for bringing tuple-esque operations to the language.
Re:Upcoming changes in PHP 7.1 by elgenie on Monday May 23, 2016 @07:04AM (#11753049)
It doesn't bring tuple-esque operations to the language; it's a shorter alternate syntax for the already existing "list()" destructuring syntax.
Re:Upcoming changes in PHP 7.1 by spdionis on Monday May 23, 2016 @08:59AM (#11753545)
But honestly with the shorter syntax it feels much more natural, compared to the weird "list" construct. Just an opinion though.
Re:Upcoming changes in PHP 7.1 by stiGGG on Monday May 23, 2016 @01:40PM (#11755441)
i dunno, i found that kind of special functions which are actually language constructs like list(), isset(), etc always ugly. Ok, some more syntax sugar to let these things not look like normal functions is of course an improvement, but i wish they would do some more radical changes to the language. Why not add multiple return values like in golang to achieve that syntax? Isn't exactly that list() should emulate in some way? Than deprecate that list() crap and throw it away in 7.2. But instead they will keep that list "function" forever along that new bracket syntax because they are afraid some code from the 90s would break. On the other hand they don't stop adding minor complete irrelevant changes that break existing code from yesterday.
Re:Upcoming changes in PHP 7.1 by tegansnyder on Monday May 23, 2016 @06:57AM (#11753024)
That is a more comprehensive list. Thanks for sharing.