Voodoo PHP
summary
Shows concrete language hacks: using the Reflection API and closure bind to mutate private state, the weird backslash-0 property encoding and the unset trick Doctrine uses for lazy loading, and how references and generators can silently change values or segfault the process. Demonstrates libraries that relied on those behaviors (alter-ego/proxies, Humbug, an AOP layer, preprocess-style tools), explains when the tricks actually solved testing or performance problems and when they caused regressions or crashes.
AI-written summary · about
chapters (14)
- 0:00Introduction
- 1:08Demystifying magic
- 3:33Who is the magician?
- 6:28The tools of the trade
- 9:54Building a magic contraption
- 14:27Real-world magic use cases
- 18:02PHP object internals
- 22:12Lazy loading with magic
- 25:06Becoming a core contributor
- 29:34Libraries leveraging magic
- 33:31Experimental magic features
- 36:55The cost of magic
- 42:00When to use magic
- 46:41Conclusion
related talks
25mCrazy Fun Experiments with PHP (Not for Production)
55mFantastic functions and where to find them
01h 04mA Tour of New Language and Library Features
01h 11mTransforming PHP
35mPHP is evil (Defensive programming)
58mObjects, Testing and Responsibility
36mPHP Under The Hood
37mLet's Program Like It's 1999
