← All built-ins / ffi_call()
ffi_call()
unsafeffi_call(...$args): mixed
Parameters
| Name | Type | Description |
|---|---|---|
| $lib | resource | handle from ffi_load() |
| $symbol | string | exported function name |
Return value
Callable for the native function. Requires unsafe.
Example
echo "// unsafe { $fn = ffi_call($lib, "MessageBoxA"); }";// unsafe { $fn = ffi_call($lib, "MessageBoxA"); }This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.