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)
2 months 24 days ago

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

Codecourse
Guest
Codecourse
2 months 23 days 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
2 months 24 days ago

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

Codecourse
Guest
Codecourse
2 months 23 days 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
2 months 24 days ago

Editor name ? Available on Windows?

Codecourse
Guest
Codecourse
2 months 23 days ago

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

Codecourse
Guest
Codecourse
2 months 23 days ago

That's the one!

Codecourse
Guest
Codecourse
2 months 23 days 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
2 months 24 days ago

That theme makes it look so much like atom.

AllyPost
Guest
AllyPost
2 months 24 days ago

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

Sergio Pascareli
Guest
Sergio Pascareli
2 months 24 days 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
2 months 23 days 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