Several of my projects do heavy markdown parsing. Comment rendering, documentation pipelines, content management. The volume keeps growing, and I've been hitting the point where pure-PHP parsers (Parsedown, league/commonmark, cebe/markdown, michelf) just can't keep up. They're solid libraries, but parsing thousands of documents per request or chewing through 200 KB files in interpreted PHP is slow no matter how well the code is written. I wanted something 10x+ faster that could serve as a drop-in replacement for the common cases. The result is mdparser, a native C extension that wraps cmark-gfm (GitHub's CommonMark parser) and exposes it through a clean PHP 8.3+ OO API. I'm releasing it today. How it works mdparser vendors a copy of cmark-gfm 0.29.0.gfm.13 directly into the extension's shared object. No external library to link against, no cmake, no runtime dependencies. The entire cmark-gfm codebase compiles alongside the PHP wrapper into a single .so (or .dll on Windows). Four cherry-picked comm...

PHP processes more Excel files than any language except maybe Python. Payroll exports, inventory imports, financial reports, data migrations. If your business runs on spreadsheets (and it does), your PHP app touches them constantly. The standard approach is PhpSpreadsheet: a pure-PHP library that parses XML, builds an in-memory object graph, and promptly devours your server's RAM. It works fine for small files. It falls apart the moment someone uploads a 50,000-row export from SAP. (Don't ask me how I know. 😢) php_excel takes a different path. It's a PHP extension that wraps LibXL, a commercial C/C++ library purpose-built for reading and writing Excel files. Unlike most alternatives, LibXL handles both modern xlsx (Office 2007+) and the legacy xls binary format (Excel 97-2003), so you don't need separate codepaths for old and new files. Instead of parsing XML in userland PHP, every cell read and write is a single C function call. In my benchmarks it's 7-10x faster than PhpSpreadsheet, and its memory f...

Teaching AI Agents How to Engineer Every AI coding agent ships with the same problem: it knows syntax but not discipline. It can write a React component or debug a segfault, but it won't ask "did I verify this actually works?" before declaring victory. It won't split a 400-line diff into reviewable chunks. It won't check if the fix it's about to apply matches the root cause it claims to have found. I've spent the past six months fixing that. compound-engineering is a Claude Code plugin, and ai-skills is its portable counterpart for 35+ AI coding agents. Together they encode the engineering judgment that separates "code that compiles" from "code you'd ship." What's in the box The compound-engineering plugin ships 29 skills, 20 specialized agents, and 22 commands. Skills are compact instruction sets that fire based on what you're working on. Agents are purpose-built reviewers and researchers. Commands wire them into repeatable workflows. The ai-skills repo extracts just the skills into a format a...

In the PHP community, "persistent connections" are often treated like a dark art; powerful, but prone to blowing up in your face. We've been told they cause "Too many connections" errors, stale data, and dangling transactions. The truth? In high-traffic environments, persistent connections are your best friend. If you understand how PHP internals and networking flows actually work, they are the single most effective way to slash latency and stabilize your database. The "Connection Tax": What You Pay Every Request Every time you call new PDO() or mysqli_connect() without persistence, your server begins a grueling marathon. Before a single byte of SQL is executed, the following must happen: DNS Resolution: Converting db.example.com to an IP. Even with caching, this is a network hop. TCP 3-Way Handshake: The client and server exchange SYN, SYN-ACK, and ACK packets. This requires a full round-trip (RTT) SSL/TLS Negotiation: If you use encryption (standard for cloud DBs), this is...

My slides from the Confoo 2022 conference are now available: Introduction to Clickhouse Queuing Worker Engine via PHP-FPM Thanks to everyone who attended and the engaging questions.

  • «
  • 1