~/talk

How to write extensions

Talkat phpday 2025 · 2025-05-15..05-16· [php]
slides:none on file

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

  1. 0:00PHP extensions intro
  2. 4:36Minimal PHP extension
  3. 11:27Adding functions
  4. 16:46Returning values and errors
  5. 23:24Working with arrays
  6. 31:11Iterating arrays
  7. 35:49Objects in extensions
  8. 41:31Adding methods
  9. 42:14Q&A
~/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.