← All posts

Tag

PHP

13 posts

PHP 8.6 Performance Benchmark: The php-fpm Image Is Thread-Safe, and That Costs 2%
PHPPerformanceDockerLaravelSymfony

PHP 8.6 Performance Benchmark: The php-fpm Image Is Thread-Safe, and That Costs 2%

php:8.6-fpm is built thread-safe and php:8.5-fpm is not. Laravel and Symfony on php-fpm, php-cgi, FrankenPHP and the CLI, on an x86_64 server and an arm64 Mac: 1.5 to 2.6% fewer requests per second, all of it the build. Sliders, a fleet calculator and the 70% result I threw away.

November 26, 202648 min read
Read post
pgvector in Laravel 13: Tenant Filters, HNSW and the Rows That Go Missing
LaravelPostgreSQLpgvectorRAGPHP

pgvector in Laravel 13: Tenant Filters, HNSW and the Rows That Go Missing

whereVectorSimilarTo() on 100,000 Wikipedia paragraphs in PostgreSQL 18 with pgvector 0.8.7: a tenant filter that loses rows only for the largest teams, paginate() pages that come back empty, and a fix that collides with the similarity threshold. Measured, with the class that fixes all three.

November 11, 202624 min read
Read post
PIE Replaces PECL: Installing PHP Extensions in Docker, Measured
PHPDockerDevOpsTooling

PIE Replaces PECL: Installing PHP Extensions in Docker, Measured

PIE replaces pecl install. I moved Docker builds to it and measured: parallel builds made redis almost twice as fast and ran grpc out of memory, prebuilt binaries come from mirrors PIE cannot verify, and PIE exits 0 when an extension it installed does not load.

November 8, 202622 min read
Read post
Durable AI Agents in Laravel: an LLM Agent on Temporal, Crashes Included
AgentsLaravelTemporalPHPLLM

Durable AI Agents in Laravel: an LLM Agent on Temporal, Crashes Included

A Laravel support agent built twice, as the usual loop and as a Temporal workflow, then killed mid-refund. Temporal keeps the model's decision but still repeats the refund, and only a key per order pays once. One Laravel call made the live PHP worker report a result that never happened.

November 6, 202619 min read
Read post
Transactional Outbox: Retry and Monitoring
PatternsReliabilityMessagingObservabilityPHP

Transactional Outbox: Retry and Monitoring

Part two of the outbox: a lease instead of a held lock, failures sorted into three retry budgets, full-jitter backoff bounded by time rather than by count, per-aggregate ordering, dead letters with a way back, and the lag metric and tested alerts that tell you any of it works.

October 30, 202629 min read
Read post
Watching an Unpatched RCE Land: PHP 5.6 Under AddressSanitizer
PHPSecurityCVEPHP Internals

Watching an Unpatched RCE Land: PHP 5.6 Under AddressSanitizer

The advisory patches 8.2 to 8.5 and backports 7.4, 8.0 and 8.1. PHP 5.6 gets nothing. So I built 5.6.40 under AddressSanitizer and sent the advisory's own inputs at it: mod_php takes a real SEGV from two ordinary requests, PHP-FPM survives, and no exploit, it stops at the crash.

October 21, 202610 min read
Read post
PHP's October RCE: Patch First, Then Check What Your Version Number Hides
PHPSecurityCVEDevOps

PHP's October RCE: Patch First, Then Check What Your Version Number Hides

Two critical, unauthenticated PHP RCEs, patched the same day. The update is the easy part; knowing where you stand is not. Why the distribution version string and the moving image tag both lie, how to check the SAPI that serves traffic, and the interim settings the oldest branches skip silently.

October 21, 202618 min read
Read post
The Boundary in Laravel: FormRequest Is Not a DTO
PHPLaravelArchitecturePerformance

The Boundary in Laravel: FormRequest Is Not a DTO

Laravel already enforces two of the five boundary rules and breaks the other three. Deptrac covers the layers, five reflection checks cover what it cannot see, and the measured price is not the mappers — it is the validators that hit the database.

October 21, 202618 min read
Read post
DTO-First: The Boundary Decides What the Domain Sees
PHPSymfonyArchitecturePerformance

DTO-First: The Boundary Decides What the Domain Sees

DTO-first is advice until something enforces it. Five boundary rules, each checked by a gate that fails the build — and the measured price of the doctrine: the mappers cost half a microsecond, and one validator constraint costs more than all the others together.

October 20, 202621 min read
Read post
An MCP Server in PHP: Signed State Is Provenance, Not Single Use
PHPMCPReliability

An MCP Server in PHP: Signed State Is Provenance, Not Single Use

An MCP server that asks before it rolls a service back has to survive being asked twice. Three defects found while reviewing a working one — a refusal read as consent, a signature mistaken for single use, and a replay guard with a race in it — with the measurement behind each fix.

October 14, 202619 min read
Read post
PHP 8.6: every feature, before and after
PHPToolingPerformance

PHP 8.6: every feature, before and after

PHP 8.6 removes ceremony: a placeholder instead of a lambda, a default instead of a constructor body, a Duration instead of an int. Every change here is measured on 8.5 and 8.6 — including the optimisations that did not reproduce and the one shape that got slower.

October 14, 202630 min read
Read post
Sudo Mode in Symfony 8.2: The Rule That Silently Drops the Freshness Check
SymfonySecurityPHP

Sudo Mode in Symfony 8.2: The Rule That Silently Drops the Freshness Check

Symfony 8.2 makes sudo mode a primitive: IS_AUTHENTICATED_RECENTLY, a clock instead of a session flag, and a step-up that needs no code of yours. Plus the multi-attribute rule that silently drops the check.

October 5, 202615 min read
Read post
pgBouncer: PostgreSQL Connection Pooling — Installation and Configuration
PostgreSQLDevOpsPHP

pgBouncer: PostgreSQL Connection Pooling — Installation and Configuration

PostgreSQL spawns a separate process per connection, burning 5-10 MB of RAM before the first query. pgBouncer multiplexes hundreds of client connections through a small pool of real database connections, cutting RAM usage and preventing PostgreSQL from crawling under heavy concurrent load.

August 27, 20268 min read
Read post