PHP loves its arrays. Arrays are the uber-data structure. They're a list, a map, a stack, a queue, everything in one! Which is the problem. Modern PHP grossly over-uses arrays. In most cases there are better options today, and when you find yourself reaching for 'oh I'll just make this an associative array', stop. An extra 60 seconds of thought and code will often give you a more readable, faster, more memory-efficient, more flexible alternative. Classes, iterables, and collections can and should replace arrays in most of your day to day coding. This talk will go through what PHP arrays actually are (hint: they are not, in fact, arrays at all), why they're so problematic, and what to do instead. By the end, you should find yourself (almost) never reaching for arrays to solve a problem.

Comments

Comments are closed.

Gene Surov at 17:38 on 8 Jun 2021

Great talk. Terrible sound.

Great

Excellent talk! Only downside was the sound, which was constantly distorting.

Great talk!!

Salvo Bonanno at 12:08 on 14 Jun 2021

I've to be honest, this was most awaited talk to me, and my expectations was definitively satisfied!
I've always thinked that making own data structs for business purposes is the right way against ubuquitous associative arrays in PHP, in fact Collections are one of my most used features when I use frameworks like Laravel (and you can easily customize them).

However, i've to join with other complaints about a REALLY bad audio :-(