[go: up one dir, main page]

0% found this document useful (0 votes)
132 views4 pages

PHP Misc. Functions

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 4

w3schools.

com LOG IN

  HTML CSS MORE  EXERCISES   

PHP Misc. Functions


❮ Previous Next ❯

PHP 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. No installation is required to use these functions.

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

Misc. configuration options:

Name Description Default Changeable

ignore_user_abort FALSE indicates that scripts will be "0" PHP_INI_ALL


terminated as soon as they try to
output something after a client has
aborted their connection

highlight.string Color for highlighting a string in PHP "#DD0000" PHP_INI_ALL


syntax

highlight.comment Color for highlighting PHP "#FF8000" PHP_INI_ALL


comments

highlight.keyword Color for syntax highlighting PHP "#007700" PHP_INI_ALL


keywords (e.g. parenthesis and
semicolon)

highlight.default Default color for PHP syntax "#0000BB" PHP_INI_ALL

highlight.html Color for HTML code "#000000" PHP_INI_ALL

browscap Name and location of browser- NULL PHP_INI_SYSTEM


capabilities file (e.g. browscap.ini)

PHP Miscellaneous Functions


Function Description

connection_aborted() Checks whether the client has disconnected

connection_status() Returns the current connection status

connection_timeout() Deprecated from PHP 4.0.5. Checks whether the script has
timed out

constant() Returns the value of a constant

define() Defines a constant

defined() Checks whether a constant exists


die() Alias of exit()

eval() Evaluates a string as PHP code

exit() Prints a message and exits the current script

get_browser() Returns the capabilities of the user's browser

__halt_compiler() Halts the compiler execution

highlight_file() Outputs a file with the PHP syntax highlighted

highlight_string() Outputs a string with the PHP syntax highlighted

hrtime() Returns the system's high resolution time

ignore_user_abort() Sets whether a remote client can abort the running of a script

pack() Packs data into a binary string

php_strip_whitespace() Returns the source code of a file with PHP comments and
whitespace removed

show_source() Alias of highlight_file()

sleep() Delays code execution for a number of seconds

sys_getloadavg() Returns the system load average

time_nanosleep() Delays code execution for a number of seconds and


nanoseconds

time_sleep_until() Makes a script sleep until the specified time

uniqid() Generates a unique ID

unpack() Unpacks data from a binary string

usleep() Delays code execution for a number of microseconds

PHP Predefined Misc. Constants

Constant Description

CONNECTION_ABORTED Connection is aborted by user or network error

CONNECTION_NORMAL Connection is running normally


CONNECTION_TIMEOUT Connection timed out

__COMPILER_HALT_OFFSET__  

❮ Previous Next ❯

COLOR PICKER

SHOP

HOW TO

Tabs
Dropdowns
Accordions
Side Navigation
Top Navigation
Modal Boxes
Progress Bars
Parallax
Login Form
HTML Includes
Google Maps
Range Sliders
Tooltips
Slideshow
Filter List
Sort List

SHARE

You might also like