Wow, I didn't realize 8.0 was coming soon. RC1 is out now, with a GA projected for 2020-11-26. github.com/php/php-src/blob/ph

wow FINALLY, this was my biggest Pet PHPeeve: "Access to undefined constants now always results in an Error exception."

Show thread

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.

Similar concepts exist in other languages named Annotations in Java, Attributes in C#, C++, Rust, Hack and Decorators in Python, Javascript. wiki.php.net/rfc/attributes_v2

Show thread

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.

Show thread
Follow

"Nested ternaries now require explicit parentheses." thank god

· · Web · 1 · 0 · 1

Type hinting supports union types wiki.php.net/rfc/union_types_v

Optional trailing comma in parameter lists wiki.php.net/rfc/trailing_comm

Nullsafe operator! $bar?->foo means your code works even if $bar is null. wiki.php.net/rfc/nullsafe_oper

Named. Fucking. Arguments. array_fill(start_index: 0, num: 100, value: 50); wiki.php.net/rfc/named_params

Show thread

@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.

Sign in to participate in the conversation
XOXO Zone

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!