← All built-ins / free()
free()
unsafefree(...$args): void
Parameters
| Name | Type | Description |
|---|---|---|
| $ptr | pointer | raw pointer from FFI |
Return value
Frees the memory. Double-free = corruption; that is why this needs unsafe.
Example
echo "// unsafe { free($p); }";// unsafe { free($p); }This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.