The return expression is evaluated before finally runs, and the value is not handed to the caller until afterwards — so a finally that returns wins, silently. A…
Type-hinting iterable is the right choice for anything that consumes a sequence, and it makes two promises the caller has to honour. Accepting iterable is a promise to…
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…