PHP 7.4's FFI Support Is In Good Shape For Tapping C Functions / Structures From PHP
FFI is one of the prominent new features to PHP 7.4 along with the preload feature, hardening the PHP FPM systemd service, TLS 1.3 for OpenSSL streams, and many other changes. The PHP 7.4 FFI approach is comparable to that of FFI implementations for other languages.
Usage of PHP FFI moving forward should yield less of a need for writing new PHP modules for interfacing with C libraries/programs while now can be done using the foreign function interface. For those curious about sample code / examples for PHP 7.4 FFI, Fedora/RedHat PHP packager Remi Collet has written a new blog post outlining some of the use-cases with example code.
Those wishing to learn more about the PHP 7.4 FFI support can also see the documentation on PHP.net and their basic examples. There still are a few more PHP 7.4 release candidates ahead while the general availability is still slated to happen on/around the 28 November.