PHP Function Reference

PHP - Miscellaneous Functions



These functions were placed here because none of the other categories seemed to fit.

Installation

There is no installation needed to use these functions. These functions are part of the PHP core.

Runtime Configuration

The behavior of these functions is affected by settings in php.ini.

Misc. Configuration Options

NameDefaultDescriptionChangeable
ignore_user_abort"0"Default is false. If changed to true scripts will not be terminated after a client has aborted their connection. See ignore_user_abort().PHP_INI_ALL
highlight.string"#DD0000"Color for highlighting a string in PHP syntaxPHP_INI_ALL
highlight.comment"#FF8000"Color for highlighting a PHP commentPHP_INI_ALL
highlight.keyword"#007700"Color for syntax highlighting PHP keywords (e.g. parenthesis and semicolon)PHP_INI_ALL
highlight.default"#0000BB"Default color for PHP syntaxPHP_INI_ALL
highlight.html"#000000"Color for HTML codePHP_INI_ALL
browscapNULLName and location of browser capabilities file (e.g.: browscap.ini). See get_browser().PHP_INI_SYSTEM

PHP Miscellaneous Functions

FunctionsDescription
connection_aborted() Check whether client disconnected.
connection_status() Returns connection status bitfield.
constant() Returns the value of a constant.
define() Defines a named constant.
defined() Checks whether a given named constant exists.
die() Output a message and terminate the current script. Equivalent to exit()
exit() Output a message and terminate the current script.
eval() Evaluates a string as PHP code.
get_browser() Tells what the user's browser is capable of.
__halt_compiler() Halts the compiler execution.
highlight_file() Syntax highlighting of a file.
highlight_string() Syntax highlighting of a string.
hrtime() Get the system's high resolution time.
ignore_user_abort() Sets whether a client disconnect should abort script execution.
pack() Pack data into binary string.
php_strip_whitespace() Return source with stripped comments and whitespace.
sapi_windows_cp_conv() Convert string from one codepage to another.
sapi_windows_cp_get() Get current codepage.
sapi_windows_cp_is_utf8() Indicates whether the codepage is UTF-8 compatible.
sapi_windows_cp_set() Set process codepage.
sapi_windows_generate_ctrl_event() Send a CTRL event to another process.
sapi_windows_set_ctrl_handler() Set or remove a CTRL event handler.
sapi_windows_vt100_support() Get or set VT100 support for the specified stream associated to an output buffer of a Windows console.
show_source() Syntax highlighting of a file. Alias of highlight_file() function.
sleep() Delays execution.
sys_getloadavg() Gets system load average.
time_nanosleep() Delays for a number of seconds and nanoseconds.
time_sleep_until() Makes the script sleep until the specified time.
uniqid() Generates a unique ID.
unpack() Unpack data from binary string.
usleep() Delays execution in microseconds.

Predefined Constants

The constants below are defined by this extension, and will only be available when the extension has either been compiled into PHP or dynamically loaded at runtime.

CONNECTION_ABORTED (int)

CONNECTION_NORMAL (int)

CONNECTION_TIMEOUT (int)

__COMPILER_HALT_OFFSET__ (int)