Menu

Reference

Ffi

Classes

BorrowParameter attribute: the caller keeps ownership of the pointer and the callee must not free it.
BorrowMutParameter attribute: the caller keeps ownership; the callee may write through the pointer but must not free it.
CTypeDeclares the C type of a binding's return value or parameter when PHP's own type is too coarse.
GiveFunction attribute: the callee returns an owned pointer that the caller must free.
LibraryNames the native library that provides a binding's C symbol and adds it to the link line.
PtrAn opaque C pointer: a raw address with no automatic free.
StaticPtrFunction attribute: the returned pointer refers to static or global memory that nobody frees.
SymbolBinds a PHP free function to the C symbol of the given name.
TakeParameter attribute: the callee takes ownership of the pointer and frees it at its own discretion.
VariadicMarks a binding as a C variadic function (ret f(a, b, ...)).
WeakMarks a binding whose C symbol may be missing on the current OS or target.