Resolving an Invoice Number Collision in an E-Invoice Integration
Two workers produced the same invoice number in production. A log of how I resolved the race condition vs. legal gap dilemma in a real project.
Tag
Building applications with PHP: language features, versions and practices.
There are 45 posts with this tag.
Two workers produced the same invoice number in production. A log of how I resolved the race condition vs. legal gap dilemma in a real project.
A view from 18 years of PHP development — the 2026 state of PHP through W3Techs, Stack Overflow, JetBrains, and Packagist data, including the language's often-ignored weaknesses.
From define to asymmetric visibility — a three-axis mental model and a concrete decision matrix for getting immutability right in modern PHP.
Everything written in this journal from 2014 to 2026, and the story of growth it tells — and a closing.
How becoming a multi-language developer turned into a supposed goal, why it never really was one, and how I actually got there.
The real state of PHP in 2026: language maturity, ecosystem health, and why the 'it's dead' narrative is still wrong.
A reflection on how my priorities as a developer have shifted over eleven years of this journal — from speed to resilience, from code to decisions.
PHP 8.5 isn't out yet, but reading through the proposals on the table reveals how a language evolves over more than a decade.
The hidden cognitive overhead of working in multiple languages simultaneously, and how I manage it.
Property hooks and asymmetric visibility in PHP 8.4, and how these additions will change the way we model classes.
A reflection on how moving between PHP, Go, Python, and TypeScript within a single year shaped the way I think about software.
Typed class constants, json_validate, #[Override], and dynamic constant access in PHP 8.3 — the language's steady steps toward consistency.
Using RabbitMQ with PHP: creating a message queue, publishing messages, and consuming them.
How to set up asynchronous job queues in Laravel using the database driver, and keep workers running reliably in production with Supervisor.
Design patterns are a tool, not a goal. When to use which pattern in PHP, and when they create unnecessary complexity.
A practical explanation of PHP traits, why they exist, and how to use them to share behavior across unrelated classes without the pitfalls of multiple inheritance.
A look at readonly classes, DNF types, and standalone type declarations in PHP 8.2, and their impact on domain modeling.
Embedding meaning into code instead of relying on primitives: why and how to design value objects in PHP.
Personal notes on why mastering multiple programming languages is a matter of tool selection, not identity.
PHP 8.1 isn't out yet, but I'm already exploring how the upcoming native enum support and readonly properties will reshape domain modelling.
A practical look at PHP type conversion and coercion: gettype, settype, var_dump, and why strict_types belongs in every file.
How we represented fixed value sets before PHP 8.1 introduced native enums, and the trade-offs of each approach.
PHP 8.0 is out. I share how I've been using attributes and the nullsafe operator in real projects, and what they've actually delivered.
PHP 8.0 isn't out yet, but the RFCs and beta releases are already readable. Here are my notes on three key features worth understanding before release.
A practical guide to PHP exceptions and error handling: try-catch-finally blocks, multiple catch clauses, custom exception classes, and global handlers.
PHP 7.4 was released in November 2019. Typed properties and arrow functions significantly strengthen the language's type system and syntax.
A hands-on look at PHP 7.3's flexible heredoc syntax and list assignment improvements, and how they contribute to better code readability.
An honest look at what I learned throughout 2018, how my habits shifted, and what I want to pursue next.
From installing PHPUnit to writing my first unit tests — what worked, what tripped me up, and the lessons learned along the way.
What PHP 7.2 introduced and how the direction of the language has shaped my day-to-day coding habits.
Connecting to external services in PHP with the Guzzle HTTP client — covering timeouts, error handling, and building a reliable request structure.
What closures (anonymous functions) are in PHP, how variable capture with the use keyword works, and practical everyday examples.
PHP 7.1's nullable type declarations and void return type make function signatures more readable and precise.
How I use interface definitions and dependency injection in PHP to build loosely coupled classes, illustrated with practical examples.
How I apply SRP — the S in SOLID — to PHP classes with concrete examples, moving beyond abstract theory.
A practical look at how I use scalar type declarations and return type definitions introduced in PHP 7.
PHP 7.0 was released this week. I share my first impressions on the performance gains, scalar type declarations, and return types.
I configured a PHP package from scratch and published it on Packagist so others could use it — here's how I did it.
An overview of PHP 5.6's variadic argument support and the new exponentiation operator, with practical examples.
What each layer of MVC is actually responsible for, and how to keep your controllers thin.
The language-level approach to building large loops without blowing up memory: PHP 5.5 generators and the yield keyword.
The structure that comes from moving beyond raw PHP to a framework: first impressions, installation, and the basics of Laravel 4.
Code organization that eliminates name collisions and fits the modern library ecosystem: PHP namespace usage and the use statement.
Moving away from manual class includes to standard autoloading: the difference between PSR-0 and PSR-4, and Composer integration.
The practical side of moving from a pile of manual requires to modern dependency management: composer.json, autoloading, and installing packages.