Convert a boolean into a string What could go wrong? I was recently spelunking through the Cornstack/nomic training dataset, the massive corpus of code that feeds some of our modern AI overlords, when I noticed something amusing. One of the queries in that dataset ask how to “convert a boolean to a string in PHP,” […]
Recently updated PIE extensions (since July 30th, 2026) #1 17 PHP Pie extensions were updated. php-debugger/php-debugger (0.2.3): A lightweight, high-performance PHP debugger extension. Comptible with Xdebug step-debugging. phalcon/cphalcon (v5.18.2): Phalcon is an open source web framework delivered as a C extension for the PHP language providing high performance and lower resource consumption. xberg-io/tree-sitter-language-pack (v1.14.3): Pre-compiled […]
The Case Of The Insensitive Filesystem There is a special kind of bug that only exists between your laptop and the production server. It compiles, it tests, it ships, and then it 500s. Somewhere along the way, User.php became user.php, and one of the two machines had an opinion about it. PHP has no opinion. […]
When PHP Meet Unicode: A Tour of Identifiers Beyond ASCII Every year, like clockwork, someone rediscovers that a day is not reliably 86400 seconds long, gets righteously indignant about daylight change on Hacker News, and two hundred comments later the whole internet has relearned a lesson it relearns every March and October. PHP’s “you can […]
I Checked Every php.* Domain on the Internet There are 1,437 top-level domains recognized by IANA today, things like .com, .museum, .fr, and obscure ones such as .ismaili and .bugatti. I decided to find out how much of the internet’s php.* namespace has actually been claimed, checking php.<tld> against every single one of them and […]
__FILE__: The Magic Constant With Specific Usage Every older PHP developer has meet __FILE__ early, usually while copy-pasting a WordPress plugin header from a tutorial written in 2009. There are lots of blogs posts documenting it: it is also quite famous outside the PHP universe. Nowadays, however useful is this magic constant, it seems it […]
There and Back Again: Round-Trip Testing in PHP Most of the work in a unit test is not calling the function. It is knowing what the function is supposed to return. You call it, you get a value, and now you type the expected value by hand and pray you did the arithmetic in your […]
Constant Scalar Expressions In PHP Constants are the immovable rocks of a PHP application. Once defined, they never change. Yet, since PHP 5.6, those rocks may be carved with expressions. This is the realm of constant scalar expressions, where PHP allows a little bit of calculation in a place that was, for a long time, […]
flock() is a Suggestion, Not a Law I spend a fair amount of my professional life staring at static analysis reports for a living, and every so often a rule reminds me that I’ve been trusting a piece of the standard library a little too much. This week it was flock(). The original question was: […]
Hidden Traps with Chained Assignments If you’ve been writing PHP for a while, you’ve almost certainly written a few chained assignments yourself. It’s that neat, concise trick where you initialize multiple variables or properties on a single line: It looks clean. It feels efficient. It’s the kind of line that makes you feel, for one […]
When Generators Actually Makes Sense Generators are one of PHP 8 best-loved features. Sprinkle a yield into a function and suddenly you’re processing millions of rows with constant memory. At least, that’s the promise. The reality is more nuanced: lazy evaluation only pays off when the underlying data source can produce records incrementally. If the […]











