News for hackers. Stuff that matters.
Re:Upcoming changes in PHP 7.1 by elgenie on Monday May 23, 2016 @07:21AM (#11753104)
This hot take is both pretty uncharitable and largely incorrect.

... "catch (FooException | BarException" is new syntax that would be a include-time fatal in existing code

... "public const FOO" is new syntax that would be a include-time fatal in existing code; public is the default modifier in the language when no visibility modifier is present, so existing code functions exactly the same as before

... ": void" return type only conflicts with existing code if a class is named Void, which becomes an error for the file declaring the class ... this is vanishingly unlikely [0] and an easy grep to fix; if you're looking at some code "$var = i_return_void();", the annotation is a clear sign that the "$var =" part is obviously confused.

... " 5 + 'a string' " is nonsense code which codebases that care about warnings currently want to be aware of.

[0] even the few hits for https://github.com/search?utf8=%E2%9C%93&q=%22class+Void+%22... are mostly false positives.

There are no comments on this comment yet.