Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

connection_status

Description

The connection_status of Miscellaneous for PHP returns connection status bitfield.

Syntax

connection_status ( void ) : int

Return

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

Examples

1

<?

$status = connection_status();
echo $status . " = ";

switch ($status) {
    case CONNECTION_NORMAL:
        echo "normal";
        break;
    case CONNECTION_ABORTED:
        echo "aborted";
        break;
    case CONNECTION_TIMEOUT:
        echo "timeout";
        break;
}

?>
0 = normal
HomeMenu