Bohuslav Šimek

PHP FFI vs extension development: Which approach is better? (talk)

September 25, 2021 0 min read
image

Since PHP 7.4 there is no need to write a PHP extension if we want to use an existing library. But is it really easier to communicate with external libraries through PHP FFI? Doesn't it make more sense to prioritize the development of extensions regardless of the need to learn another programming language? In this talk, I will demonstrate how to communicate with external libraries through PHP FFI and how to do exactly the same with PHP extension written in pure C. Thanks to line-by-line comparison, we will discover which approach is better together.

Link to Google slides