Tree-sitter and PHP: Two Directions, Endless Possibilities

Tree-sitter and PHP: Two Directions, Endless Possibilities

Tree-sitter and PHP: Two Directions, Endless Possibilities Tree-sitter is a very popular library in the computer ecosystem at large. It powers syntax highlighting in Neovim, structural search in VS Code, and a growing wave of static analysis tools, including in PHP environment. What makes it compelling is a combination of properties rarely found together: a […]

Adding the last types to PHP code in 2026

Adding the last types to PHP code

Adding the last types to PHP code 2026 update note: This is an update of the original 2022 article, with annotations added locally to flag what’s changed in the PHP language since: mainly PHP 8.4’s property hooks and asymmetric visibility, which give native answers to several problems the article works around by hand. Adding the […]

setlocale() and Its Six Personalities

setlocale() and Its Six Personalities What does setlocale() actually do? It changes the date format, right? It’s a fair guess, and it’s wrong in an interesting way: setlocale() doesn’t touch one behavior, it touches six, and most of them have nothing to do with dates. Under the hood it’s a thin wrapper around the C […]

The Clock That Cracks Passwords

The Clock That Cracks Passwords

The Clock That Cracks Passwords To understand what is the clock that cracks passwords, let’s start with a quizz. Which security flaw does the following PHP login check contains? If you said “the password should be hashed with bcrypt”, you are right and you may stay. If you said “use === instead”, you are wrong […]

TypePHP, native PHP, NativePHP: the ecosystem has a vocabulary problem

TypePHP, native PHP, NativePHP: the ecosystem has a vocabulary problem

TypePHP, native PHP, NativePHP: the ecosystem has a vocabulary problem PHP names things by accretion. A word gets used for something, then reused for something adjacent, then reused again by a project that picked the name because it was available on Packagist. Nobody arbitrates. Ten years later you have a conference hallway conversation where two […]

Rewritten in PHP

Rewritten in PHP

Rewritten in PHP The application was “rewritten in Rust” meme runs one direction. Or it also goes to Go, just because it is fun. Here’s the traffic going the other way, and why it’s less silly than it sounds. Nobody writes a blog post titled “we ported it to PHP”. The genre convention is the […]

Recently updated PIE extensions #3

Recently updated PIE extensions #11

Recently updated PIE extensions (since August 13th, 2026) 25 PHP Pie extensions were updated. bsn4/grpc (v0.4.0): Rust-based gRPC extension for PHP — drop-in replacement for ext-grpc paragonie/ext-pqcrypto (v0.3.2): PHP extension for post-quantum cryptography (ML-KEM, X-Wing, ML-DSA, SLH-DSA) mongodb/mongodb-extension (2.4.0): MongoDB driver extension phalcon/cphalcon (v5.19.0): Phalcon is an open source web framework delivered as a C […]

The Secret Life of “Magic Null” in PHP

The Secret Life of "Magic Null" in PHP

The Secret Life of “Magic Null” in PHP PHP 8 has started a tightening in native functions arguments: every version brings stricter checks on calls to common functions. Gone are the days of passing null into a function expecting an integer and hoping for the best. Today, usort($arr, null) or array_walk($arr, null) will instantly crash […]

PHP Method Resolution Order: Class · Trait · Parent · Interface

PHP Method Resolution Order

PHP Method Resolution Order: Class · Trait · Parent · Interface PHP offers three different places to define a method: directly in a class, in a trait the class uses, and in a parent class it extends. Interfaces define contracts, the method signatures without a body, so they don’t contribute an implementation to the chain, […]

Recently updated PIE extensions (since 7th, 2026)

Recently updated PIE extensions #11

Recently updated PIE extensions (since 7th, 2026) 24 PHP Pie extensions were updated. bsn4/grpc (v0.3.0): Rust-based gRPC extension for PHP — drop-in replacement for ext-grpc flow-php/flow-php-ext (0.43.0): Flow PHP native extension (Rust) – Floe frame-body encoder/decoder for DataFrame Rows xberg-io/tree-sitter-language-pack (v1.15.0): Pre-compiled tree-sitter grammars for 371 programming languages thomas-0816/pdo-duckdb-php (1.5.5.7): PHP PDO Driver for DuckDB, […]