PHP connection_status function – Returns connection status bitfield

Description

The connection_status() function takes no parameters and returns 0 if the connection is live and execution is still taking place; 1 if the connection is aborted; 2 if the connection has been aborted; and 3 if the connection has been aborted and subsequently timed out.

Syntax:

connection_status(): int

The values 0, 1, 2, and 3 evaluate to the constants CONNECTION_NORMAL, CONNECTION_ABORTED, CONNECTION_TIMEOUT, and CONNECTION_ABORTED | CONNECTION_TIMEOUT (a bitwise OR of the previous two).

Parameters

This function has no parameters.

Return Values

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

Related Post