php

  • Nullable types finally have syntax

    PHP 7.0 gave return types and no way to say a method might legitimately return nothing, so anything that could miss simply went untyped. 7.1 adds a leading…

  • Format bytes as a human readable size in PHP

  • sodium in core replaces the extension nobody installed

    Modern cryptography in PHP has meant either openssl with a lot of decisions to get wrong, or a PECL extension nobody had. 7.2 puts libsodium in core, with…

  • OPcache is per-process-pool, not per-server

    Two PHP-FPM pools have two separate OPcache shared memory segments, so a cache reset in one does nothing to the other — and the site serves a mix…

  • Mailable classes and why the view is not the email

    An email assembled in a controller — subject here, view there, attachments in a third place — cannot be tested without sending it, and the subject line ends…

  • Designing an API two mobile clients can live with

    Two apps, two release cycles, and neither can be forced to update. What is additive, what is not, and the decisions that have to be made before the…

  • void says the return value is not the point

    A method that exists for its effect has always returned null implicitly, which means a caller assigning its result gets something rather than an error. void makes the…

  • Data providers run before setUp, every time

    A provider that builds its cases from something created in setUp() fails with a null, because every provider in the class runs before any test does — including…

  • list() with keys unpacks an associative row

    Destructuring only worked positionally, so a row fetched as an associative array had to be unpacked by hand — three assignments and a typo waiting to happen. A…

  • withoutOverlapping on a scheduled command

    A scheduled task that occasionally runs longer than its interval will be started again while the first is still going, which for an import means two processes writing…