-
Apache2 Performance Tuning: MPM Modules Explained
Apache2 MPM modules explained: prefork, worker, and event, and why switching to PHP-FPM unlocks the more efficient event MPM.
-
PHP 8.1 Enums Explained with Real Examples
PHP 8.1 enums explained with a real order-status example, including how backed enums map cleanly to and from a database.
-
Building a Simple MVC Framework in PHP From Scratch
Building a minimal MVC skeleton in plain PHP to understand what frameworks like Laravel are actually doing under the hood.
-
Working with Multidimensional Arrays in PHP
Working with multidimensional arrays in PHP: iteration, sorting by nested keys, and when to switch to objects instead.
-
phpMyAdmin vs the MySQL CLI: Pros and Cons of Each
phpMyAdmin vs the MySQL CLI: where each genuinely wins, and why an exposed phpMyAdmin install is a recurring security liability.
-
How PHP’s Garbage Collector Actually Works
How PHP’s reference-counting garbage collector actually works, and where memory leaks realistically show up in practice.
-
Encoding and Decoding JSON in PHP
Encoding and decoding JSON in PHP correctly, including the UTF-8 encoding gotcha that silently breaks json_encode.
-
Unit Testing PHP Code with PHPUnit
Getting started with PHPUnit: installing it via Composer, writing your first test class, and where to focus first.
-
Running Multiple PHP Versions on the Same Apache2 Server
Running multiple PHP versions side by side on one Apache2 server using PHP-FPM, one virtual host per version.
-
Building a Secure Contact Form with PHP and mail()
Building a secure PHP contact form with mail(), and the header injection vulnerability that catches most first attempts.
-
Building a Simple Templating Engine in PHP
Building a minimal PHP templating engine using output buffering, and what real engines like Twig add on top of it.
-
A Practical Cheat Sheet for PHP String Functions
A practical cheat sheet of the PHP string functions you’ll actually use, including PHP 8’s cleaner contains/starts-with helpers.
-
What’s New in PHP 8.4: A Practical Overview
A practical overview of PHP 8.4’s most useful new features, including property hooks.
-
Validating and Sanitizing PHP Form Input Properly
Validating and sanitizing PHP form input properly with filter_input, plus why you still need to escape on output.
-
PHP Basics: Variables, Types, and Type Juggling Explained
A practical look at PHP’s dynamic typing and the type juggling gotchas that trip up even experienced developers.
-
Understanding PHP Generators and the yield Keyword
How PHP generators and the yield keyword let you process huge datasets without loading everything into memory at once.
-
PHP Error Handling: Exceptions, Try/Catch, and Custom Error Classes
Using PHP’s exception system properly: try/catch/finally, and why custom exception classes beat generic error checking.
-
Why Connection Pooling Matters for MySQL Performance
Why connection pooling matters for MySQL performance, and the difference between PHP’s persistent connections and real poolers like ProxySQL.
-
PHP Type Declarations and declare(strict_types=1)
What declare(strict_types=1) actually changes in PHP, and why coercive type mode hides bugs instead of preventing them.
-
Migrating Legacy PHP Code from mysql_* to mysqli or PDO
Migrating legacy PHP code off the removed mysql_* functions to mysqli or PDO, with a direct before/after comparison.
-
PHP Closures and Anonymous Functions Explained
PHP closures and arrow functions explained, including how variable capture with use() actually works.
-
From PHP 4 to PHP 8: How Far the Language Has Come
Tracing PHP’s evolution from PHP 4’s loosely-typed wild west to PHP 8’s modern, strictly-typeable language features.
-
Handling File Uploads in PHP Securely
Handling file uploads securely in PHP: verifying real file content, size limits, and safe filename generation.
-
Handling Dates and Times Correctly in PHP
Handling dates and times properly in PHP with DateTimeImmutable, timezone objects, and safe user input parsing.
-
A Practical Cheat Sheet for PHP Array Functions
A practical cheat sheet of PHP array functions that replace common manual loops with one-liners.
-
Password Hashing in PHP: password_hash() Done Right
Why password_hash() and password_verify() should be the only password hashing functions you ever use in PHP.
-
PHP Traits vs Interfaces: When to Use Each
The real difference between PHP traits and interfaces, and when to reach for each one.
-
Debugging PHP Applications with Xdebug
Setting up Xdebug for real step-through debugging in PHP, connecting your editor, and using it for performance profiling too.
-
Building a REST API in Plain PHP Without a Framework
Building a working JSON REST API in plain PHP without pulling in a framework, for small internal services.
-
Writing PHP CLI Scripts for Cron Jobs
Writing PHP CLI scripts for cron jobs, including proper database cleanup and the crontab entry to schedule it.
-
PHP Namespaces and PSR-4 Autoloading Explained
How PHP namespaces work and how PSR-4 autoloading maps namespace paths directly to file locations.
-
PHP Performance: How OPcache Actually Speeds Things Up
How PHP’s OPcache eliminates repeated parsing overhead, and the production configuration change that matters most.
-
Laravel vs Plain PHP: When You Actually Need a Framework
A practical framework for deciding when plain PHP is the right call and when Laravel or Symfony actually pays for itself.
-
PHP Magic Methods: __construct, __get, __call, and More
PHP’s magic methods explained — __construct, __get, __toString, __call — and why to use them sparingly.
-
PHP Readonly Properties and Why Immutability Matters
PHP 8.1’s readonly properties explained through a Money value object, and why immutability eliminates a class of bugs.
-
Hardening PHP Session Security Against Hijacking
Hardening PHP session security with proper cookie flags, session ID regeneration on login, and idle timeout enforcement.
-
PHP Sessions vs Cookies: What to Use and When
Why sessions and cookies solve different problems in PHP, and why sensitive data should never live in a plain cookie.
-
Connecting to MySQL from PHP with PDO
Connecting to MySQL from PHP with PDO, and why prepared statements should be non-negotiable for any query touching user input.
-
Using Regular Expressions in PHP with the preg Functions
Using PHP’s preg_ functions for pattern matching, extraction, and replacement, with practical examples of each.
-
PHP Static vs Instance Methods and Properties
The practical difference between PHP static and instance methods, and when each one actually makes sense.