~/talk

New Feature: What the Fibers extension can do for you

Talkat International PHP Conference 2025 · 2025-06-02..06-06· [php, concurrency]
links:none on file
slides:none on file

Shows a practical port of DuckDB into PHP both as a quick DuckDB via PHP FFI prototype and as a native PHP extension built with the PHP source, gdb and valgrind/grind debugging. Finds FFI easy to iterate and cross-platform, reports FFI is only ~6% slower once header parsing is removed, and exposes risks: pointer handling, manual memory free required and header-macro pain. Builds both approaches, uncovers a memory-leak in the extension path, and concludes FFI is fine for prototyping and many workloads.

AI-written summary · about

  1. 0:00Intro
  2. 0:40What is FFI?
  3. 0:55What problems does FFI solve?
  4. 2:18Limitation of FFI
  5. 3:30Talk is cheap, show me the code!
  6. 4:06PHP vs C - function definition
  7. 5:11Header files
  8. 6:25Preprocessor - it can be extremely powerful!
  9. 7:30DuckDB - introduction
  10. 8:23DuckDB - bindings
  11. 8:39DuckDB - example
  12. 17:21Extension development - prerequisites
  13. 18:26Extension development - generate skeleton
  14. 18:52Extension development compilation
  15. 19:10Define API a little surprise
  16. 19:46Heart of extension - zend_module_entry
  17. 24:18Macro expansion
  18. 31:16Performance - numbers
  19. 32:20Comparison - common
  20. 36:39Which one is better?
~/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.