In my longer introduction to PHP generators we didn’t talk much about a generator’s “key” values. In other words — when presented with code like this function someGeneratorFunction() { yield 'foo'; yield 'baz'; yield 'bar'; } $generator = someGeneratorFunction(); foreach($generator as $key=>$value) { echo [...]
astorm
Despite maintaining an open source version of their code base, there were a lot of things about a pre-Adobe Magento that gave a lot us in the open source world cause for — not alarm exactly — but some heavy side-eye. One of those was Magento’s approach to composer. On one hand — huzzah! Composer support! On the [...]
astorm
Generators landed back in PHP 5.5 and I’ve mostly ignored them. I had a vague understanding that they were a feature that allowed you to build iterators that didn’t require loading up a huge data structure with all your information. This also seemed to be the gist of most online generator tutorials. So, in the practical world [...]
astorm
I did another quick survey of what’s state of the art for PHP and Amazon’s Lambda (i.e. Serverless, i.e. Amazon will run a function for you in the cloud that can respond to HTTP requests and interact with Amazon’s various services, getting you out of the sys-admin business). One project I see cropping up in my various [...]
astorm