Wow, I didn't realize #PHP 8.0 was coming soon. RC1 is out now, with a GA projected for 2020-11-26. https://github.com/php/php-src/blob/php-8.0.0rc1/NEWS
wow FINALLY, this was my biggest Pet PHPeeve: "Access to undefined constants now always results in an Error exception."
PHP 8 is adding "Attributes": This RFC proposes Attributes as a form of structured, syntactic metadata to declarations of classes, properties, functions, methods, parameters and constants. Attributes allow to define configuration directives directly embedded with the declaration of that code.
Neat, didn't expect this to change: "Non-strict comparisons between numbers and non-numeric strings now work by casting the number to string and comparing the strings."
So `0 == "foo"` changes from true to false in PHP 8.
"Nested ternaries now require explicit parentheses." thank god
Type hinting supports union types https://wiki.php.net/rfc/union_types_v2
Optional trailing comma in parameter lists https://wiki.php.net/rfc/trailing_comma_in_parameter_list
Nullsafe operator! $bar?->foo means your code works even if $bar is null. https://wiki.php.net/rfc/nullsafe_operator
Named. Fucking. Arguments. array_fill(start_index: 0, num: 100, value: 50); https://wiki.php.net/rfc/named_params
@annika what the heck is happening, why is php good
up is down and short is long
@00dani I'm so excited! I've been using PHP for 20 years, professionally for 12, and it's been an amazing transformation. Steady improvement since PHP 5.3 back in like 2009.
The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!