Category

PHP

PHP code that you can run: dates in the Shamsi calendar, one time passwords and static analysis, with checks against standards and tools.

  • Typing an old PHP project with PHPStan

    PHP

    PHPStan can check a PHP project that has almost no types. The baseline lets you start today and fix the old errors one file at a time.

    6 minute read

  • Passkeys in PHP and C#, step by step

    .NET

    A passkey sign in is two steps on the server. This post builds both in PHP and in C#, protects the add step, and tests the refusals that matter most.

    15 minute read

  • TOTP in PHP without a library

    PHP

    Authenticator apps use a small standard, TOTP. A few lines of PHP can make and check the codes, and the RFC test values show that they are right.

    6 minute read

  • Shamsi dates in PHP: where DateTime stops

    PHP

    PHP's DateTime knows only the Gregorian calendar. This post shows what the intl extension can do for Shamsi dates, a small converter that agrees with it on 73,414 days, and a free package that does the work.

    8 minute read