Chris Morrell@cmorrell.com5 Sept 2025TIL about `array_column` in PHP 🤩 And it can work on objects, too, so here's simple way to get all the values from a backed enum… (It's also about 2x faster than `array_map` in my testing.)1319
Joe Tannenbaum@joe.codes5 Sept 2025Just learned about it this last year but never remember to reach for it 2x faster?? If that's true I'll reach for it more often, sheesh1
Chris Morrell@cmorrell.comThis was the result of my (very very simple) benchmark.5/9/25, 4:22 pm·0 reposts·1 like
Chris Morrell@cmorrell.com5 Sept 2025Obviously this won't matter in 99.999% of cases. All these benchmarks were with 10,000,000 iterations 😂12
Joe Tannenbaum@joe.codes5 Sept 2025I mean for the stuff I'm doing now it does matter and I will implement! Thanks for the intel 🫡12