Leave a Reply

12 Comments on "What’s new in PHP 7.1: Array deconstruction improvements (3/12)"

Notify of
avatar

Alex L (alexeightsix)
Guest
Alex L (alexeightsix)
10 days 13 hours ago

what happens if the variables don't exist in the array?

Codecourse
Guest
Codecourse
10 days 2 hours ago

With normal list(), it would search in order, so anything past that would be ignored. If you're using [$key] = ['key' => 'value'] I'm not actually sure right now. Give it a go 🙂

AllyPost
Guest
AllyPost
10 days 16 hours ago

I love that edit at 1:06legit lol'd at that one

Codecourse
Guest
Codecourse
10 days 2 hours ago

Hahah I just watched it back to check what you meant. No shade on the correct spelling of color (sorry, I mean COLOUR).

ToXiiiiCTV
Guest
ToXiiiiCTV
10 days 17 hours ago

Editor name ? Available on Windows?

Codecourse
Guest
Codecourse
10 days 2 hours ago

You might want to following this on how I set everything up. It's not really changed!

Codecourse
Guest
Codecourse
10 days 2 hours ago

That's the one!

Codecourse
Guest
Codecourse
10 days 2 hours ago

It does yeah. I've been meaning to switch to Atom but to me it's like moving house – I'll need some time to adjust 🙂

woodchuck 00
Guest
woodchuck 00
10 days 14 hours ago

That theme makes it look so much like atom.

AllyPost
Guest
AllyPost
10 days 16 hours ago

I think it's this one: equinsuocha.io/material-theme/

Sergio Pascareli
Guest
Sergio Pascareli
10 days 20 hours ago

It's been a while since I've used PHP but you can also use extract() on associative array and the keys become the variable names, the only new thing with this syntax seems to be that you can assign a different variable name for a key.

Codecourse
Guest
Codecourse
10 days 2 hours ago

Yeah this was mentioned on Twitter to me. You're right about the only real change generally, but yup, nice to be able to pluck out the keys you want.

wpDiscuz