πŸ“„
Part 1 article
UTF-8 Safety in PHP β€” The /u Flag and Multibyte Regex

How PHP's PCRE engine silently corrupts Devanagari text without the /u flag, the bullet-point production bug, diagnosing json_encode() returning false, and addi…

β†’
πŸ“„
Part 2 article
JSON in HTML Attributes β€” The ENT_QUOTES Trap

Why json_encode() output in onclick breaks HTML (and creates XSS), how JSON_HEX_TAG + htmlspecialchars(ENT_QUOTES) fixes it, and why data attributes + event lis…

β†’
πŸ“„
Part 3 article
PHP Type Safety Under Apache

Strict types and TypeError in production webhooks β€” the single missing argument that crashes a request after all work is done. Static analysis with PHPStan to f…

β†’
πŸ“„
Part 4 article
Structured JSONL Logging

Correlation IDs per request, the production allowlist that keeps PII out of logs, LOCK_EX on every write, JSON_UNESCAPED_UNICODE, and the difference between aud…

β†’
πŸ“„
Part 5 article
Webhook Deduplication Strategies

INSERT IGNORE as the atomic deduplication primitive β€” why SELECT+INSERT is wrong, TTL cleanup for the dedup table, and extending the pattern to Celery tasks and…

β†’
πŸ“„
Part 6 article
Fallback Chains for Unreliable External Services

TTS β†’ conversion β†’ upload β†’ send: per-step logging, text fallback at every failure point, and the circuit breaker pattern to stop retrying after N consecutive f…

β†’
πŸ“„
Part 7 article
Database Schema Migrations in PHP

File-naming with zero-padded sequences, the migrations tracking table with checksum verification, ALGORITHM=INSTANT for live ALTER operations, and why up-only m…

β†’
← All Series