FFI ConfigureOptions
This extension requires the libffi library to be installed.
Setup
Required
This extension requires the libffi library to be installed.
Configure
Runtime Runtime
| Name | Default | Changeable | Changelog |
|---|---|---|---|
| ffi.enable | "preload" | INI_SYSTEM | |
| ffi.preload | "" | INI_SYSTEM |
Constants
Title
ffi.enablestringAllows enabling (
"true") or disabling ("false") FFI API usage, or restricting it only to the CLI SAPI and preloaded files ("preload").The FFI API restrictions only affect the
FFIclass, but not overloaded functions ofFFI\CDataobjects. This means that it is possible to create someFFI\CDataobjects in preloaded files, and then to use these directly in PHP scripts.ffi.preloadstringAllows preloading of FFI bindings during startup, which is not possible with
FFI::loadif opcache.preload_user is set. This directive accepts aDIRECTORY_SEPARATORdelimited list of filenames. The preloaded bindings can be accessed by callingFFI::scope.