PHP Misc


Introduction to PHP Miscellaneous Functions

We classify functions that do not belong to other categories into the miscellaneous function category.


Installation

Miscellaneous functions are an integral part of PHP core. No installation is required to use these functions.


Runtime Configuration

The behavior of miscellaneous functions is affected by settings in the php.ini file.

Miscellaneous configuration options:

##NameDefaultDescriptionCan be changedignore_user_abort"0"FALSE Indicates that the script will be terminated whenever it attempts output after the client terminates the connection. PHP_INI_ALLhighlight.string"#DD0000" is used to highlight strings that conform to PHP syntax color. PHP_INI_ALLhighlight.comment"#FF8000"The color used to highlight PHP comments. PHP_INI_ALLhighlight.keyword"#007700"Color used for syntax highlighting of PHP keywords (such as parentheses and semicolons). PHP_INI_ALLhighlight.bg"#FFFFFF"Background color. PHP_INI_ALLhighlight.default"#0000BB"The default color for PHP syntax. PHP_INI_ALLhighlight.html"#000000"The color of the HTML code. PHP_INI_ALLbrowscapNULLThe name and location of the browser performance file (for example: browscap.ini). PHP_INI_SYSTEM

PHP Miscellaneous Functions

PHP: Indicates the earliest PHP version that supports this function.

FunctionDescriptionPHP
connection_aborted()Check whether the client is disconnected. 3
connection_status()Returns the current connection status. 3
connection_timeout()Deprecated in PHP 4.0.5. Check if the script has timed out. 3
constant()Returns a constant value. 4
define()Define a constant. 3
defined()Check whether a constant exists. 3
die()Output a message and exit the current script. 3
eval() Treat strings as PHP code to evaluate. 3
exit()Output a message and exit the current script. 3
get_browser()Returns the performance of the user's browser. 3
highlight_file()Perform PHP syntax highlighting on files. 4
highlight_string()Perform PHP syntax highlighting on strings. 4
ignore_user_abort()Set whether disconnecting from the remote client will terminate the execution of the script. 3
pack()Load data into a binary string. 3
php_check_syntax()Deprecated in PHP 5.0.5. 5
php_strip_whitespace()Returns the source code file with PHP comments and whitespace characters removed. 5
show_source() Alias ​​for highlight_file(). 4
sleep()Delay code execution for a few seconds. 3
time_nanosleep()Delay code execution for a number of seconds and nanoseconds. 5
time_sleep_until()Delay code execution until the specified time. 5
uniqid()Generate a unique ID. 3
unpack()Unpack data from a binary string. 3
usleep()Delay code execution for a number of microseconds. 3


PHP Miscellaneous Constants

PHP: Indicates support for this constant The earliest version of PHP.

##CONNECTION_NORMAL##CONNECTION_TIMEOUT##__COMPILER_HALT_OFFSET__
ConstantDescriptionPHP
CONNECTION_ABORTED





5