← All built-ins / stream_eof()

stream_eof()

stream_eof(...$args): bool

Parameters

NameTypeDescription
$sockresourcesocket handle

Return value

true when the peer closed the connection.

Example

echo "see registry/server.hphp";
see registry/server.hphp

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

See also

stream_recv()