Overview
Explore the Fibers extension in PHP 8.1 through this 41-minute conference talk from the International PHP Conference. Discover how this core feature aims to solve concurrent execution challenges and compare it to async frameworks like Swoole and ReactPHP. Delve into the concept of green threads, examining their advantages and disadvantages. Learn about FFI (Foreign Function Interface), its problem-solving capabilities, and limitations. Gain practical insights through code examples comparing PHP and C function definitions, and understand the power of preprocessors. Investigate DuckDB, including its introduction, bindings, and usage examples. Dive into extension development, covering prerequisites, skeleton generation, and compilation processes. Analyze performance metrics and compare different approaches to determine the most effective implementation for your projects.
Syllabus
Intro
What is FFI?
What problems does FFI solve?
Limitation of FFI
Talk is cheap, show me the code!
PHP vs C - function definition
Header files
Preprocessor - it can be extremely powerful!
DuckDB - introduction
DuckDB - bindings
DuckDB - example
Extension development - prerequisites
Extension development - generate skeleton
Extension development compilation
Define API a little surprise
Heart of extension - zend_module_entry
Macro expansion
Performance - numbers
Comparison - common
Which one is better?
Taught by
International PHP Conference