PHP connection_status() Function

The connection_status() function returns the current connection status.

int connection_status ( void )

Gets the connection status bitfield.

Possible values that can be returned are:

  • 0 - CONNECTION_NORMAL - connection is running normally
  • 1 - CONNECTION_ABORTED - connection is aborted by user or network error
  • 2 - CONNECTION_TIMEOUT - connection timed out
  • 3 - CONNECTION_ABORTED & CONNECTION_TIMEOUT
  • Return Values

    Returns the connection status bitfield, which can be used against the CONNECTION_XXX constants to determine the connection status.