Note, sorry but this article is going to skip between languages a bit. If you work in PHP, you likely know what they do and how to use them…

What prompted this article is that I was just working on a “function stack” of anonymous that other processes can add to, and I used this because of the “You can’t add to an array inside a foreach” issue; and a colleague saw it and said “what the devil is that?!?”

This stems from the fact that foreach grabs the key of “last” to compare to for its loop.

So many of its structures correspond to assembly in ways that should have made it really easy to make it run fast.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners