PHP Misc. Functions

76

PHP Misc. FunctionsPHP Miscellaneous Introduction

The misc. functions were only placed here because none of the other categories seemed to fit.


Installation

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


Runtime Configuration

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

Misc. configuration options:

NameDefaultDescriptionChangeable
ignore_user_abort“0”FALSE indicates that scripts will be terminated as soon as they try to output something after a client has aborted their connectionPHP_INI_ALL
highlight.string“#DD0000”Color for highlighting a string in PHP syntaxPHP_INI_ALL
highlight.comment“#FF8000”Color for highlighting PHP commentsPHP_INI_ALL
highlight.keyword“#007700”Color for syntax highlighting PHP keywords (e.g. parenthesis and semicolon)PHP_INI_ALL
highlight.bg“#FFFFFF”Color for backgroundPHP_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)PHP_INI_SYSTEM

 


PHP Misc. Functions

PHP: indicates the earliest version of PHP that supports the function.

FunctionDescriptionPHP
connection_aborted()Checks whether the client has disconnected3
connection_status()Returns the current connection status3
connection_timeout()Deprecated in PHP 4.0.53
constant()Returns the value of a constant4
define()Defines a constant3
defined()Checks whether a constant exists3
die()Prints a message and exits the current script3
eval()Evaluates a string as PHP code3
exit()Prints a message and exits the current script3
get_browser()Returns the capabilities of the user’s browser3
highlight_file()Outputs a file with the PHP syntax highlighted4
highlight_string()Outputs a string with the PHP syntax highlighted4
ignore_user_abort()Sets whether a remote client can abort the running of a script3
pack()Packs data into a binary string3
php_check_syntax()Deprecated in PHP 5.0.55
php_strip_whitespace()Returns the source code of a file with PHP comments and whitespace removed5
show_source()Alias of highlight_file()4
sleep()Delays code execution for a number of seconds3
time_nanosleep()Delays code execution for a number of seconds and nanoseconds5
time_sleep_until()Delays code execution until a specified time5
uniqid()Generates a unique ID3
unpack()Unpacks data from a binary string3
usleep()Delays code execution for a number of microseconds3

 


PHP Misc. Constants

PHP: indicates the earliest version of PHP that supports the constant.

ConstantDescriptionPHP
CONNECTION_ABORTED
CONNECTION_NORMAL
CONNECTION_TIMEOUT
__COMPILER_HALT_OFFSET__5
loading...
SHARE

LEAVE A REPLY