๐ŸŽ‰๐ŸŽ‰ PHP 7.3 is here!

Here are the things I'm excited about.

๐Ÿš‚ Trailing commas in function/method calls!

This will certainly be a required styling choice for me. Same delightful benefits of trailing comma in multi-line PHP arrays, and JavaScript objects.
๐Ÿงต Less disgusting heredoc syntax!

Inlining heredoc strings in any way right now is grrrosssss. Now we get sensible capabilities. Everything that was wrong with it is now fixed!

(Ignore the bad syntax highlighting)
โ˜ ๏ธ Finally, not-so-silent json_decode error detection!

This really sucked before, now it just sucks a bit less (who wants to pass a 4th param and pass 2 default params first? (helper function anybody?)
๐Ÿ“œ Not horrible functions for getting the first and last item (or key) from an array!

Before you either strung a bunch of functions together or messed with internal array pointers. This is a much-needed improvement.
And that's all the things I care about! Check out this link more all the details in more depth: https://t.co/sXtgYRVN57

Most Liked Replies

Taylor Otwell โš—๏ธ:
Fun fact: head() and last() functions in laravel helpers ๐Ÿ”ฅ
Patrique Ouimet:
I used these today (end/key) and was looking for something "cleaner", glad something is coming! #php
Rob:
Game changer.
James LaChance:
While I do like the named function for it, at the very least, getting the first item was always trivial with $array[0] - but I do agree that functions names are better :)
Caneco:
But at least for me it's not easy to ignore the bad syntax.
Did you get any luck finding a solution in Sublime?
Brandon Shar:
Hereโ€™s to hoping this is another step towards php named arguments!
Lil Uaz Vert โ„ข:
If I had the choice Iโ€™d have a comma trailing after me IRL.
Dylan Ryan:
why is your editor looking so good ๐Ÿฅฐ
Abdelmounaam ๐Ÿ“ฆ:
The fourth parameter is for backward compatibility I think ๐Ÿค”
Marcus Bointon:
Top of my list: samesite flag for cookies


Original Tweet