~/talk

Of representation and interpretation: A unified theory

Talkat phpDay 2019 · 2019-05-10..05-11· [php, security]

Many bugs trace to confusing representation with interpretation, so the concrete claims are: SQL escaping is representation not security; character encodings require explicit hints like Content-Type or a BOM; MB_detect_encoding is unreliable for ambiguous byte sequences; and PHP strings are byte arrays so building Utf8Bytes wrapper and RealString type or other injective representations prevents lossy conversions. The demo shows named constructors, type-wrapped byte sequences, and tradeoffs: correctness versus performance and engineering overhead.

AI-written summary · about

  1. 0:00Intro
  2. 0:32Problems in programming
  3. 1:10Introduction
  4. 1:45Data
  5. 3:42Prime Numbers
  6. 5:04Data has different meaning
  7. 5:21Functions
  8. 8:22Mathematics
  9. 8:34Programming
  10. 10:26Money
  11. 11:50Representation
  12. 13:13Interpretation
  13. 13:45Why
  14. 15:19String escaping
  15. 15:29String escaping examples
  16. 17:40String escaping is not a security measure
  17. 18:04String escaping as a representation
  18. 19:00SQL literal
  19. 19:22JavaScript literal
  20. 19:56Magic quotes
  21. 20:36Use cases
  22. 22:28Injectivity
  23. 22:53Time
  24. 24:52Decode fromutf8
  25. 26:11Duck typing
  26. 26:28Detect encoding
  27. 27:17Interpretation of data
  28. 27:45HTTP headers
  29. 28:32Sheet music
  30. 28:53byte order mark
  31. 29:50variable name
  32. 30:23title HTML
  33. 30:56boot HTML entities
  34. 31:33string type
  35. 33:17String types
  36. 35:52String methods
  37. 37:46Fairy objects
  38. 38:50Recap
  39. 39:45Conclusion
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.