php

  • spl_object_id, and the hash that was never a hash

    spl_object_hash returns a 32-character string that looks like a digest and is really an encoded pointer, and pointers get reused — so the identifier of a garbage-collected object…

  • Window functions replace a habit

    8.0 went GA in April and the correlated subquery can retire. The plans before and after, the recursive CTE that replaces a loop, and the upgrade nobody expects.

  • PSR-15 middleware, and the interface it standardised

    Every framework had middleware and none of them agreed on the signature, so a piece of middleware was written once per framework despite doing the same thing. The…

  • What the regulation actually asks of a schema

    The deadline is in May and the work is not a cookie banner. An inventory first, because everything else depends on knowing which tables hold what.

  • Single-server scheduling and the cron that ran three times

    Three application servers each running the same crontab means every scheduled task runs three times, and the invoice job discovers this before you do. The lock is a…

  • Model events do not fire on a mass update

    An observer that keeps a search index in step works perfectly until somebody writes a query builder update, at which point the rows change and nothing notices. This…

  • Laravel 5.6 and logging you can configure

    Logging moved into a config file, and stacks are why it matters — a different format per destination, decided without touching a service provider.

  • Symfony 4 and the bundle that does not exist

    A new project used to arrive with forty megabytes of vendor code and one route. The framework got smaller, and the interesting part is what happens at install…

  • The service provider you always end up writing

    Every service eventually needs the same provider: bind the interfaces, register the client with its credentials, and set up whatever the framework does not do on its own.…

  • Apache mod_php and php-fpm are not the same deployment

    Moving from Apache with mod_php to nginx with php-fpm changes where PHP runs, which user it runs as, and which configuration file it reads — and each of…