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








