← All built-ins / ffi_load()
ffi_load()
unsafeffi_load(string $s): mixed
Parameters
| Name | Type | Description |
|---|---|---|
| $path | string | shared library: "mylib.dll" / "libmy.so" |
Return value
Library handle for ffi_call(), or false on failure. Requires unsafe.
Example
echo "// unsafe { $lib = ffi_load("user32.dll"); }";// unsafe { $lib = ffi_load("user32.dll"); }This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.