• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

PHP connection_status function – Returns connection status bitfield

by admin

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.

Filed Under: PHP

Some more articles you might also be interested in …

  1. “Access denied for user ‘username’@’hostname’ (using password: YES)” – Error while connecting MySQL with PHP
  2. PHP function chr() – Generate a single-byte string from a number
  3. htaccess Cheatsheet
  4. PHP function strcmp() – Binary safe string comparison
  5. PHP function str_ireplace() – Case-insensitive version of str_replace()
  6. PHP function stripcslashes() – Un-quote string quoted with addcslashes()
  7. PHP function chop() – Alias of rtrim()
  8. PHP Function strncasecmp() – Binary safe case-insensitive string comparison of the first n characters
  9. PHP function convert_cyr_string() – Convert from one Cyrillic character set to another
  10. PHP function stripslashes() – Un-quotes a quoted string

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright