How to contribute to PHP
summary
Hands‑on tutorial walks through compiling PHP, generating an extension skeleton and actually building a C extension for rational numbers (numerator/denominator), wiring arginfo from .stub.php so register_class and properties appear automatically, writing phpt tests and running make test until three generated tests are green, debugging failing C with phpt+GDB flow. It covers parameter parsing (ZEND_PARSE_PARAMETERS), throwing ValueError for zero denominator, and confirms the extension compiles and the tests run.
AI-written summary · about
chapters (21)
- 0:00Intro
- 0:40Who am I
- 2:00Slides
- 3:01Documentation
- 5:35PhD
- 6:58Web PHP
- 7:54Tests
- 10:47Extensions
- 12:10PHP
- 13:26Resources
- 16:34Issue triage
- 17:33Internals mailing list
- 22:19What we work on
- 27:26Defining the class
- 28:18Register the class
- 29:29Define the module
- 32:09Declaring a method
- 34:19Zend values
- 36:44If check
- 38:09Adding methods
- 41:16Adding more methods








