FFI for PHP 7.4 give access to features from system libraries directly from PHP
PHP 7.4, which will be released at the end of next month, will introduce an interesting new feature, which is the long-awaited support for FFI (Foreign Function Interface). This feature allows developers to give access to features from system libraries directly from PHP without any need to the additional extension. FFI and preloading will be important new features in PHP 7.4, and FFI also enhances the PHP FPM systemd service, TLS 1.3 for OpenSSL streams, and many other changes.
Using PHP FFI should reduce the need to write new PHP modules for the C library/program interface, as it is now possible to do so using the external function interface. If you’re curious about the sample code for PHP 7.4 FFI, Remi Collet, a PHP packager engineer for Fedora/RedHat, wrote a new blog post that outlines some use cases with sample code.
If you want to learn more about PHP 7.4 FFI, check out the documentation on PHP.net and its basic examples. It is estimated that there will be multiple RC versions before the release of PHP 7.4 GA, and GA is expected to be released around November 28.