Posts

Why you should be typing your arrays in PHP
Why you should be typing your arrays in PHP

We have been able to natively type parameters of methods and functions in PHP for quite some time. In basically any version of PHP you should be running we can do something like the following:

Jul 17, 2024

How to fix "connect to host github.com port 22: Operation timed out"
How to fix "connect to host github.com port 22: Operation timed out"

Youre on holiday, and suddenly you cant push or pull your github or gitlab repos, find out why that could be, and how to fix it.

Jul 9, 2024

What is PHP's declare(strict_types=1); and why you should use it
What is PHP's declare(strict_types=1); and why you should use it

declare(strict_types=1) makes your code more strict, but what does it actually do?

Jul 4, 2024

Adding PHPStan to a legacy project

Learn how to integrate PHPStan, a powerful static analysis tool, into your PHP projects to enhance code quality and reduce errors, in a legacy project.

Jun 27, 2024

What ive been reading: Deep work by Cal Newport
What ive been reading: Deep work by Cal Newport

A book about deep work, on how to gain focus, and increase your productivity

Jun 26, 2024

5 Tips for better code reviews

Become an expert code reviewer

Jun 21, 2024

Analyze your tests with PHPStan

Use PHPStan to analyze your tests, to make them more effective, and reduce bugs

Jun 10, 2024

How to create a random string in PHP
How to create a random string in PHP

Use the Randomizer class to generate a random string, based on an input string.

Jun 4, 2024

Mastering PHPUnit: Using Mocks and Stubs

Learn how to use mocks and stubs in PHPUnit to make your tests faster and more focused.

May 30, 2024

Mastering PHPUnit: Using data providers

Learn how to use data providers in PHPUnit, to test a lot of scenarios and reduce code duplication

May 22, 2024