Tag: PHP

Introduction to Iterators and Generators in PHP

In this post I demonstrate an effective way to create iterators and generators in PHP and provide an example of a scenario in which using them makes sense. Generators have been around since PHP 5.5, and iterators have… Read More

Yield in PHPUnit data providers

Initially I started creating a general post about PHP Generators, a feature introduced in PHP 5.5. However since I keep failing to come up with good examples for some cool ways to use Generators, I decided to do… Read More

OOP file_get_contents

I’m happy to announce the immediate availability of FileFetcher 4.0.0. FileFecther is a small PHP library that provides an OO way to retrieve the contents of files. What’s OO about such an interface? You can inject an implementation… Read More

PHP development with Docker

I’m the kind of dev that dreads configuring webservers and that rather does not have to put up with random ops stuff before being able to get work done. Docker is one of those things I’ve never looked… Read More

PHP 7.1 is awesome

PHP 7.1 has been released, bringing some features I was eagerly anticipating and some surprises that had gone under my radar. New iterable pseudo-type This is the feature I’m most exited about, perhaps because I had no clue… Read More

Implementing the Clean Architecture

Both Domain Driven Design and architectures such as the Clean Architecture and Hexagonal are often talked about. It’s hard to go to a conference on software development and not run into one of these topics. However it can… Read More

Rewriting the Wikimedia Deutschland fundraising

Last year we rewrote the Wikimedia Deutschland fundraising software. In this blog post I’ll give you an idea of what this software does, why we rewrote it and the outcome of this rewrite. The application Our fundraising software… Read More

PHP Unconference Europe 2016

Last week I attended the 2016 edition of the PHP Unconference Europe, taking place in Palma De Mallorca. This post contains my notes from various conference sessions. Be warned, some of them are quite rough. Overall impression Before… Read More

5 ways to write better mocks

In this post I share 5 easy ways to write better mocks that I picked up over the years. These will help you write tests that break less, are easier to read, are more IDE friendly, and are… Read More

Missing in PHP7: Nullable return types

This is the fifth post in my Missing in PHP7 series. The previous one is about Collections. This is a short post, as there really is not much to explain or motivate. Nullable return types As of PHP7,… Read More