PRESENTATION: “Never* Use Arrays” by Larry Garfield, Director of Developer Experience, Platform.sh
When: Thursday, February 11, 2021 — 7pm-9:00pm
Please RSVP at: https://www.meetup.com/atlantaphp/events/276249027/.
Zoom Webinar Link: https://us02web.zoom.us/j/451710299
Presentation: Never* Use Arrays
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.
About Larry: Larry Garfield is an aspiring blacksmith who moonlights as Director of Developer Experience for Platform.sh. When not trying to hand-forge his own medieval armory from scratch, he tries to teach developers and development managers the skills of yesteryear that the industry has forgotten. He is the author of several books on PHP, including “Thinking Functionally in PHP” and “Exploring PHP 8.0.”
(Due to COIVD-19 limiting in-person meetings, we’ve joined forces with Boston PHP and Austin PHP to form MergePHP, your new PHP Mega Meetup Group! We’ll be working together to provide high quality speakers in a multi-group session. Otherwise, it’ll work like our previous online meetings but NOTE: we’ll meet on the second Thursday of the month for now, instead of the first Thursday.)