It defines a constant
Example
<?php
define(“LAN”,”phpcode”);
echo constant(“LAN”);
?>
Output
phpcode
It defines a constant
Example
<?php
define(“LAN”,”phpcode”);
echo constant(“LAN”);
?>
Output
phpcode
It returns the value of a constant
Example
<?php
define(“LAN”,”phpcode”);
echo constant(“LAN”);
?>
Output
phpcode
It checks if the script timed out
Example
<?php
if(connection_timeout())
echo “Timed out”;
?>
Its deprecated in PHP 4.0.5
It returns the current connection status
Example
<?php
echo connection_status ();
?>
It returns one of the follows
0 – CONNECTION_NORMAL – connection is running normally
1 – CONNECTION_ABORTED – connection is aborted by user or network error
2 – CONNECTION_TIMEOUT – connection timed out
3 – CONNECTION_ABORTED & CONNECTION_TIMEOUT
It checks whether the client has disconnected.
Example
<?php
if (connection_aborted())
error_log (“Connection is aborted”);
?>