A field guide to writing PHP extensions
summary
Step‑by‑step reveals: scaffold an extension, run buildconf configure make and make install with clang and brew, generate arginfo from stubs, write C using zvals and the PHP function macros, add phpt tests and run them, and mind memory leaks with tools like V grind. The demo builds a PHP module that converts altimeter and QNH values, compiles and installs, tests pass and runtime calls return the expected numbers (1013 and 991).
AI-written summary · about
chapters (14)
- 0:00Introduction and giveaway
- 1:04About the speaker
- 2:32Motivation and CDD
- 5:05Understanding extensions
- 6:02Types of PHP extensions
- 7:22Use cases for extensions
- 9:36Getting started
- 11:52Compiling PHP
- 13:12Scaffolding an extension
- 15:04Lifecycle and internals
- 17:49Building the QNH extension
- 19:40Implementation details
- 22:11Testing and installation
- 24:16Q&A session








