Of representation and interpretation: A unified theory
summary
Claim: many bugs come from confusing representation vs interpretation and treating PHP strings as characters rather than bytes. Shows concrete failures: mb_detect_encoding lies, magic‑quotes style preescaping breaks context, lossy serializations (dates, money, fractions) lose info. Recommends escape at point of use, send hints (Content-Type, BOM), and build value objects for encodings (UTF‑8 vs ISO‑8859‑1 and a single internal real string) as a working but heavier solution.
AI-written summary · about
chapters (24)
- 0:00Start
- 0:18Hard problems in programming
- 1:04This talk is...
- 1:33A number
- 1:58A byte
- 2:28Some JSON data
- 3:11A prime number
- 7:14Impure functions
- 8:04Functions (in mathematics)
- 8:27Functions (in programming)
- 8:40Level of abstraction
- 12:27Transmission of data
- 13:17Escaping for SQL
- 16:37Chained escaping as representation
- 17:08Premature representation
- 19:11Misrepresentation
- 22:12Misinterpretation
- 24:34Interpretation hints
- 26:24Hints by variable naming
- 28:25Role overloading of string
- 32:38More accurate types (usage)
- 33:41Without value objects
- 35:11Recap
- 36:08Feedback & Questions








