運行時配置

這些函數(shù)的行為受 php.ini 中的設置影響。

FFI 配置選項
名字 默認 可修改范圍 更新日志
ffi.enable "preload" PHP_INI_SYSTEM  
ffi.preload "" PHP_INI_SYSTEM  
有關 PHP_INI_* 樣式的更多詳情與定義,見 配置可被設定范圍。

這是配置指令的簡短說明。

ffi.enable string

Allows 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 FFI class, but not overloaded functions of FFI\CData objects. This means that it is possible to create some FFI\CData objects in preloaded files, and then to use these directly in PHP scripts.

ffi.preload string

Allows preloading of FFI bindings during startup, which is not possible with FFI::load() if opcache.preload_user is set. This directive accepts a DIRECTORY_SEPARATOR delimited list of filenames. The preloaded bindings can be accessed by calling FFI::scope().