The Trick to Writing Good Code Is 'Care About Errors' — What Errors Mean for Programmers
summary
Explains how treating PHP runtime errors, warnings, and notices as useful feedback reduces bugs by configuring error_reporting(E_ALL), reading and not ignoring messages, and converting loose warnings into explicit ValueError/TypeError handling. Recommends concrete practices: add type hints and strict checks, run static analysis and unit tests, and follow the PHP 7→8 trend toward tighter checks so code breaks less when upgrading.
AI-written summary · about
chapters (13)
- 0:00Introduction
- 1:50Why languages throw errors
- 5:00Errors as friends
- 7:32PHP error severity
- 10:27Ambiguity in code
- 12:57Errors reveal ambiguity
- 14:26Case-by-case severity
- 17:14Why errors feel scary
- 19:00What errors teach
- 20:48Reading error messages
- 22:31PHP’s evolving error handling
- 25:45Strictness in modern PHP
- 26:28Summary
