← All built-ins / memset()

memset()

unsafe
memset(...$args): mixed

Parameters

NameTypeDescription
$dstpointertarget address
$byteintfill byte
$nintbyte count

Return value

Fills $n bytes with $byte.

Example

echo "// unsafe { memset($buf, 0, 1024); }";
// unsafe { memset($buf, 0, 1024); }

This call needs a real environment (window, server, database or stdin) — the snippet above shows the typical usage shape.

See also

memcpy()