How to write extensions
summary
Step‑by‑step instructions show how to build a real PHP “glue” extension for PHP 7 or 8 that wraps the GMP library, with tagged commits in a working repo on GitHub. The talk shows the exact files (config.m4, C module, generated arinfo, mygmp.stub.php), the build commands (phpize ./configure make), how functions, arrays and objects pass zvals, error checks, and binary big‑integer ops that actually add numbers beyond 64‑bit and return usable PHP values.
AI-written summary · about
chapters (9)
- 0:00PHP extensions intro
- 4:36Minimal PHP extension
- 11:27Adding functions
- 16:46Returning values and errors
- 23:24Working with arrays
- 31:11Iterating arrays
- 35:49Objects in extensions
- 41:31Adding methods
- 42:14Q&A








