Convert a boolean into a string

Convert a boolean into a string

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)

PHP Pie updates (July 30th, 2026)

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 […]

When PHP Meet Unicode: A Tour of Identifiers Beyond ASCII

When PHP Meet Unicode: A Tour of Identifiers Beyond ASCII

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

I Checked Every php.* Domain on the Internet

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

__FILE__: The Magic Constant With Specific Usage

 __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 […]

Constant Scalar Expressions In PHP

Constant Scalar Expressions In PHP

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, […]

Hidden Traps with Chained Assignments

Hidden Traps with Chained Assignments

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

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 […]