Conditional statements are at the core of decision-making in coding but they can go rogue. Here’s how to tame them.
Chat has arrived in the OpenAI API. Here’s how to invoke it from PHP.
Connect to the OpenAI GPT models from your PHP projects..
Use the Unsplash API with PHP to resize, download and save images and to generate attribution text.
If you need to shift a project between Symfony and Slim it can be useful to convert Request and Response objects between implementations. Here’s how.
Get up and running with Slim, a super-clean and extensible PHP micro-framework.
What is a dependency injection container? How and why to use PHP-DI to create objects and pass them to your components.
PHPUnit: Get testing fast. Why you should test. How you’re probably testing already.
How to build useful and flexible command line scripts with PHP and why you should.
Check that your PHP variables and array elements are set or apply default values using some super-clean and compact techniques
This lovely PHP 8 feature cuts down boilerplate in class definitions by at least half, making your code more readable and less prone to errors.
Even if you code on a Mac or Windows computer, you will need these essential Linux skills if you want to call yourself a Web developer.
Is your code trying to do too much? Dramatically improve the design of your system by focusing each component on a single responsibility.
The ArrayAccess interface lets you manage a PHP object like an array. Set, get, delete and test values using array syntax - with Callbacky - a working exampl...
Continuing the Foundations series - create a PHP directory list class using the elegant DirectoryIterator. Create reusable and extensible code to mine subdir...