Tag Archives: PHP

Closure Binding as an alternative to “use” variables

As a general rule when creating a Closure, arguments are passed when the function is called, but “use” variables (I’m sure that they have a formal name, but have no idea what it might be, so I just refer to … Continue reading

Posted in PHP | Tagged , , , | 5 Comments

Closures, Anonymous Classes and an alternative approach to Test Mocking (Part 1)

Since their first introduction with PHP 5.3, Closures have proven an incredibly useful feature for writing simple callback code, making it cleaner and more intuitive. Anonymous Functions can be used inline for many of the array functions $price = 100.00; … Continue reading

Posted in PHP | Tagged , , , | 3 Comments

Musings of a PHPDiversity Rainbow Elephpant

IT’S HAPPENING! Finally, the kickstarter is happening! And I’m ecstatic. I’d so been hoping that the kickstarter would be launched last Friday, and it felt frustrating when the day ended, and I hadn’t heard anything back from the kickstarter review team. And then I … Continue reading

Posted in PHP | Tagged , , | Leave a comment

Musings of a PHPDiversity Rainbow Elephpant

I’M REAL! I’M REAL! I know that I shouldn’t shout; but I just want to tell the whole world that I’M REAL! I’M HAPPENING! I’M A REAL ELEPHPANT! When Mark got home from work this evening, he found me sitting in … Continue reading

Posted in PHP | Tagged , , | 1 Comment

PHP Generators – Sending “Gotchas”

If you’re reading this, you’re probably already aware of just how useful PHP’s Generators are for improving performance and/or reducing memory overheads while keeping your code clean and easy to read. We can use a simple foreach() in the main body … Continue reading

Posted in PHP | Tagged , | 4 Comments

Musings of a PHPDiversity Rainbow Elephpant

It’s been a long, slow, lazy summer; but it feels as though things are accelerating in my life at the moment as we approach the launch of the PHPDiversity kickstarter. Mark promised himself that he wouldn’t proceed until he had all … Continue reading

Posted in PHP | Tagged , , | 1 Comment

Words on Diversity from the PHP Rainbow Elephpant

Enfys, the PHP Rainbow Elephpant, is intended to help promote Diversity within the PHP Community: but what exactly is Diversity? What are the benefits of Diversity? And how can Diversity be achieved?

Posted in PHP | Tagged , , | Leave a comment