The magic behind Laravel's new defer() helper
Here's how Laravel's defer() function, which was introduced a few months ago, works behind the scenes.
Read more [www.amitmerchant.com]
Posts tagged with magic
Here's how Laravel's defer() function, which was introduced a few months ago, works behind the scenes.
Read more [www.amitmerchant.com]
Surprised no one knew about that, but did you know you can do this? pic.twitter.com/OfJ7udnHFe
— Mohamed Said? (@themsaid) 15 augustus 2018
Join thousands of developers
Every two weeks, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.
No spam. Unsubscribe anytime. You can also follow me on X.
Recently when I was working on a project I got some strange results when using the empty function. Here's what I was debugging. I've simplified the code a bit to share with you. var_dump( $person->firstName, empty($person->firstName) ); This was the result: string(5) "Freek"…
Last friday Taylor Otwell tweeted an easy to use memoization function called once: Wanted a slick way to generalize class method memoization. Y'all don't even want to know how it works. ? ? pic.twitter.com/xRJAY1C14y— Taylor Otwell (@taylorotwell) November 4, 2016 Taylor was kind…
If you're interested in some dark magic you should watch this talk by Marco Pivetta on Voodoo PHP. I really like these show-me-the-code type of talks.
We've often seen "magic" code, but how does it even work? Let's explore some arguably bad PHP coding techniques that are actually used in real world libraries to solve problems that would otherwise be a huge burden for all of us.