connection_status
int connection_status(void)
Gets the current connection state.
Returns:
Integer bitfield representing the connection state
Description:
connection_status() returns a bitfield containing the current status of the connection. The following table lists the possible values returned.
Status | Integer Value (PHP 4.0.6 or earlier) | Named Constant (PHP 4.0.7 or later) | Description |
---|---|---|---|
Normal | 0 | CONNECTION_NORMAL | The connection is in a normal state. |
Aborted | 1 | CONNECTION_ABORTED | The connection was broken by the user or due to a network error. |
Timed Out | 2 | CONNECTION_TIMEOUT | The script ran past the maximum execution time allowed by set_time_limit() or the max_execution_time ini directive. |
Aborted and Timed Out | 3 | CONNECTION_ABORTED and CONNECTION_TIMEOUT ... |
Get PHP Functions Essential Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.