Every dynamic language crawled back to types. TypeScript buried JavaScript,
Python slapped annotations on the duck, and AI hammered the final nail. I've
been pushing strong types and DI since before it was fashionable. The duck is
dead, and I'm not even pretending to be sorry.
PHPStan tells you that preg_replace can return null,
and you solve it by casting (string). Congrats, you just turned a
fatal error into a silent empty string. I'll show you why a loud error is always
better than one you don't know about.
I told Claude Code to turn off wifi. It did. Then I asked it to turn wifi back
on. It couldn't — no internet. That one moment captures everything about this
“everything agent”: it can code, organize files, analyze data, automate your
work. Just never let it cut its own lifeline.
The === operator lets you sleep peacefully, but what about
< and >? There's no strict version of those,
and PHP takes the reins. I've prepared the definitive truth tables for PHP 8.x
and 7.x – no more guessing, no more test scripts, just find the intersection.
A step-by-step guide to getting Claude Code up and running — whether you
prefer the desktop app, terminal, or WSL. Unlike browser-based AI chat, this
thing actually edits your files and runs commands. Pick your poison, I'll walk
you through all of them.
Add 100 minutes to a time and you'll get an earlier result than adding 50. PHP
arithmetic around the daylight saving time transition is so absurd that not even
Kafka could have come up with it. I break down why and show how I fixed it in
Nette Utils.
Most tutorials and linters force you to shove const everywhere you
look. But a constant that's only a constant by accident isn't a constant –
it's cognitive overhead. I explain why “prefer-const” is an anti-pattern
and why a simple let is all you need.
Empty string or NULL? This seemingly trivial question can break queries, JOINs,
and the nerves of entire teams. I'll show you how to use CHECK constraints in
MySQL 8.0.16+ to enforce one approach and put an end to inconsistency once and
for all.
Directly renaming values in a MySQL ENUM is a recipe for disaster – data will
vanish faster than you can say “backup.” The proper approach has three
steps: extend the ENUM with new values, update the data, and only then remove
the old ones. No magic, just common sense.
PHP 8.4 finally kills getters and setters – except property hooks bring
their own gotchas with arrays, references, and the fact that you can't tell from
the signature whether a property is even writable. I break down where they
shine and where the traps lurk that the documentation won't serve up for you.