Home > PHP > Function > Sockets > socket_strerror()

socket_strerror()

socket_strerror - Return a string describing a socket error

Syntax

string socket_strerror (int $errno)

Arguments

  • errno - A valid socket error number, likely produced by socket_last_error().

Description

socket_strerror() takes as its errno parameter a socket error code as returned by socket_last_error() and returns the corresponding explanatory text.

Version

PHP 4.1.0, 5

Return value

Returns the error message associated with the errno parameter.