Creating PHP interfaces, traits, and classes dynamically at runtime
PHP is a wonderful dynamic language that's capable of many cool things. I recently stumbled upon something quite fantastic that I want to share with you.
In most projects...
Apr 25th 2022
•
freek.dev
From PHPUnit To Pest
A couple of months I go I had the honour giving a talk at the GPUG usergroup on how to convert a PHPUnit testsuite to Pest.
Apr 25th 2022
•
freek.dev
Learn how to write readable PHP that is a joy to maintain
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips...
Apr 20th 2022
•
freek.dev
Writing Readable PHP is now available
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips...
Apr 20th 2022
•
freek.dev
Improve Passing Booleans in PHP
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Apr 7th 2022
•
freek.dev
The case for PHP generics
I started this series by saying it’s not just about teaching you, it’s also about making my case for what I think is the most viable and the most...
Mar 25th 2022
•
stitcher.io
Why we can't have generics in PHP
We’re going to take a deep dive in what’s going on behind the scenes when it comes to generics and PHP. It’s super interesting, and very important to understand why...
Mar 24th 2022
•
stitcher.io
Generics in depth
I showed a very boring example of generics in the previous post, we’re going to do better in this one.
$users = new
Mar 23rd 2022
•
stitcher.io
Generics in PHP: The basics
Generics in PHP. I know I’d want them. And I know a lot of developers who agree. On the other hand, there is a group of PHP programmers, maybe even...
Mar 22nd 2022
•
stitcher.io
Avoid using else
Using else often encourages complexer code structure, makes code less readable. In most cases you can refactor it using early returns.
In this piece of code, it takes some...
Mar 16th 2022
•
freek.dev