18 posts

Blog

Posts and notes.

Internals11 min read

What a PHP variable actually is

A zval is sixteen bytes, a value union and a type tag. What that tag says decides whether an assignment copies anything, what a reference costs, and which variable pays.

Runtime14 min read

PHP-FPM process management in production

pm static, dynamic and ondemand, the memory ceiling nothing enforces, and how to size a pool from measurements rather than guesses.

Internals9 min read

PHP arrays are not arrays

One structure serves as list, dictionary and set. Packed and hashed layouts, what each costs in memory, and when a conversion happens.

Performance7 min read

Benchmarking PHP without lying to yourself

Microbenchmarks measure exactly what you tell them to, which is rarely what you meant. Method, noise, and the numbers worth reporting.

Internals8 min read

What happens when PHP runs your code

A request walks from the SAPI to the Zend VM — lexing, compilation to opcodes, the OPcache lookup that skips both, and execution.

Arrow keys to move, Enter to open.