執行時配置
這些函式的行為受 php.ini 中的設定影響。
| 名字 | 預設 | 可修改範圍 | 更新日誌 |
|---|---|---|---|
| ffi.enable | "preload" | PHP_INI_SYSTEM | |
| ffi.preload | "" | PHP_INI_SYSTEM |
這是配置指令的簡短說明。
-
ffi.enablestring -
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.preloadstring -
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_SEPARATORdelimited list of filenames. The preloaded bindings can be accessed by calling FFI::scope().