connection_status

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

<?

$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

PHP

Home Menu