php

  • The null coalescing assignment operator

    Setting a default only when a key is missing was $a[‘k’] = $a[‘k’] ?? $v;, which evaluates the subscript twice and reads as a statement about itself. The…

  • Preloading is a production setting with a restart cost

    7.4 can compile a set of files once at server start and keep them in memory permanently, skipping the per-request opcache lookup entirely. The catch is that preloaded…

  • Spread in an array literal, and the string keys it refuses

    Merging arrays was array_merge, which is a function call in the middle of what is otherwise a literal, and the argument order is not obvious to anyone reading…

  • A baseline is what makes static analysis adoptable

    0.12 shipped in December and the ignoreErrors list can be deleted. A generated debt register, a ratchet that only shrinks, and a level to stop at.

  • Covariant returns unblock an interface you could not write

    A child class overriding a method had to declare exactly the parent’s return type, so a factory interface could not promise that each implementation returns its own concrete…

  • array_column on an array of objects needs public properties

    array_column has worked on objects since 7.0, and it reads properties rather than calling getters — so it silently returns nothing for a well-encapsulated class. It does respect…

  • Ignition tells you what to do, which is new

    The error page in 6.0 does not just show a stack trace — it recognises common failures and offers a fix, and for a couple of them it…

  • Laravel 5.8 moved cache TTLs to seconds

    The TTL argument was minutes for years and became seconds in 5.8, which means every existing call now expires sixty times sooner and nothing warns about it. This…

  • A finally block runs before the return value is used

    The return expression is evaluated before finally executes, but the value is not handed to the caller until afterwards — which means a finally that returns wins, silently.…

  • is_countable before you call count

    Since 7.2 count() warns on anything that is not an array or Countable, and the guard everybody wrote by hand is now in the standard library. A generator…