I really like this page as well! It will definitely help improve PHP's
reputation and adoption.
I'd like to suggest a couple improvements, though:
1/ Match expression:
The new match is similar to switch and has the following features:
> (...)
> *+ Match throws an UnhandledMatchError if no match is found*
2/ Nullsafe operator:
Instead of null check conditions, you can now use a chain of calls with the
> new nullsafe operator.
> *- When the evaluation of one element in the chain fails*, the execution
> of the entire chain aborts and the entire chain evaluates to null.
> *+ When one element in the chain evaluates to null*, the execution of the
> entire chain aborts and the entire chain evaluates to null.
IMO, "fails" could imply that an unknown property, or a property that
evaluates to a non-object is acceptable.
Sorry if these suggestions come a bit late, now that translations have
landed.
— Benjamin
On Fri, 27 Nov 2020 at 16:40, Sara Golemon <pollita@php.net> wrote: