A rate limiter is four lines of Redis and a decision between two algorithms that behave differently at the boundary, and most hand-rolled ones pick the worse of…
Timing a function in a loop measures the loop, the opcache state, the CPU frequency scaling and occasionally the garbage collector — and rarely the function. The empty-loop…
The documentation was written in January and the API changed in March. Documentation written by hand is a copy, and copies drift — usually within a sprint.
An @include with eleven variables and no way to know which are required. A partial is a file rather than a contract, and 7.0 makes the constructor the…
A closure needing three variables from the enclosing scope required a use clause listing all three, which is why a one-line callback was four lines. The capture is…
A registry keyed by object identity keeps every object it has ever seen alive, so a long-running worker’s memory grows in proportion to the number of distinct objects…
Throwing from __toString was a fatal error, which meant a value object that could not render itself had to return a placeholder string and hope somebody noticed. 7.4…
Immutability in 7.4 is a convention enforced by discipline: a private typed property, a constructor that sets it, and no setter. final matters more than it looks: without…
7.4 arrived on 28 November with types on properties, and it introduces a state PHP has never had: a property that has been declared, has no default, and…