← All built-ins / stream_send()

stream_send()

stream_send(...$args): int

Parameters

NameTypeDescription
$sockresourcesocket handle
$datastringbytes to send

Return value

Number of bytes sent.

Example

echo "used in registry/server.hphp and lib/websocket.hphp";
used in registry/server.hphp and lib/websocket.hphp

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

See also

stream_recv()