===================================================
*Below this are the various PHP-specific functions *
===================================================
Invokes a COM module
Loads a COM module
Return the absolute value of the number
Return the arc cosine of the arg in radians
Returns the inverse hyperbolic cosine of arg
Returns a string with backslashes before characters that are listed in charlist parameter.
It escapes \n, \r etc. in C-like style, characters with ASCII code lower than 32 and
higher than 126 are converted to octal representation.
Returns a string with backslashes before characters that need to be quoted in database queries etc.
These characters are single quote ('), double quote ("), backslash (\) and NUL (the NULL byte).
Aggregates methods and properties defined in a class to an existing object.
Methods and properties with names starting with an underscore character (_) are considered private
to the aggregated class and are not used, constructors are also excluded from the aggregation procedure.
apache_child_terminate() will register the Apache process executing the current PHP request for termination
once execution of PHP code it is completed. It may be used to terminate a process after a script with
high memory consumption has been run as memory will usually only be freed internally but not given
back to the operating system.
This performs a partial request for a URI. It goes just far enough to obtain all the important information
about the given resource and returns this information in a class.
apache_note() is an Apache-specific function which gets and sets values in a request's notes table. If called with one argument, it returns the current value of note note_name. If called with two arguments, it sets the value of note note_name to note_value and returns the previous value of note note_name.
Create an array.
Returns an array of the parameters. The parameters can be given an index with the => operator.
Note: array() is a language construct used to represent literal arrays, and not a regular function.
Syntax "index => values", separated by commas, define index and values. index may be of type string or numeric.
When index is omitted, a integer index is automatically generated, starting at 0.
If index is an integer, next generated index will be the biggest integer index + 1.
Note that when two identical index are defined, the last overwrite the first.
Returns an array with all string keys lowercased or uppercased
Split an array into chunks
Counts all the values of an array
Computes the difference of arrays
Computes the difference of arrays with additional index check
Fill an array with values
Filters elements of an array using a callback function
Exchanges all keys with their associated values in an array
Computes the intersection of arrays
Computes the intersection of arrays with additional index check
Checks if the given key or index exists in the array
Return all the keys of an array
Applies the callback to the elements of the given arrays
Merge two or more arrays
Merge two or more arrays recursively
Sort multiple or multi-dimensional arrays
Pad array to the specified length with a value
Pop the element off the end of array
Push one or more elements onto the end of array
Pick one or more random entries out of an array
Iteratively reduce the array to a single value using a callback function
Return an array with elements in reverse order
Searches haystack for needle and returns the key if it is found in the array, FALSE otherwise.
Shift an element off the beginning of array
Extract a slice of the array
Remove a portion of the array and replace it with something else
Calculate the sum of values in an array
Removes duplicate values from an array
Prepend one or more elements to the beginning of array
Return all the values of an array
Apply a user function to every member of an array
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant.
Returns the arc sine of arg in radians. asin() is the complementary function of sin(), which means that a==sin(asin(a)) for every value of a that is within asin() 's range.
This function sorts an array such that array indices maintain their correlation with the array elements they are associated with. This is used mainly when sorting associative arrays where the actual element order is significant.
aspell_check() checks the spelling of a word and returns TRUE if the spelling is correct, FALSE if not.
aspell_check_raw() checks the spelling of a word, without changing its case or trying to trim it in any way and returns TRUE if the spelling is correct, FALSE if not.
aspell_new() opens up a new dictionary and returns the dictionary link identifier for use in other aspell functions. Returns FALSE on error.
aspell_suggest() returns an array of possible spellings for the given word.
assert() will check the given assertion and take appropriate action if its result is FALSE .
If the assertion is given as a string it will be evaluated as PHP code by assert(). The advantages of a string assertion are less overhead when assertion checking is off and messages containing the assertion expression when an assertion fails. This means that if you pass a boolean condition as assertion this condition will not show up as parameter to the assertion function which you may have defined with the assert_options() function, the condition is converted to a string before calling that handler function, and the boolean FALSE is converted as the empty string.
Using assert_options() you may set the various assert() control options or just query their current settings.
Returns the arc tangent of arg in radians. atan() is the complementary function of tan(), which means that a==tan(atan(a)) for every value of a that is within atan()'s range.
This function calculates the arc tangent of the two variables xand y. It is similar to calculating the arc tangent of y/x, except that the signs of both arguments are used to determine the quadrant of the result.
The function returns the result in radians, which is between -PI and PI (inclusive)
base64_decode() decodes encoded_data and returns the original data. The returned data may be binary.
base64_encode returns data encoded with base64. This encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean, such as mail bodies.
Returns a string containing number represented in base tobase. The base in which number is given is specified in frombase. Both frombase and tobase have to be between 2 and 36, inclusive. Digits in numbers with a base higher than 10 will be represented with the letters a-z, with a meaning 10, b meaning 11 and z meaning 35.
Given a string containing a path to a file, this function will return the base name of the file. If the filename ends in suffix this will also be cut off.
Adds the left_operand to the right_operand and returns the sum in a string. The optional scale parameter is used to set the number of digits after the decimal place in the result.
Compares the left_operand to the right_operand and returns the result as an integer. The optional scale parameter is used to set the number of digits after the decimal place which will be used in the comparison. The return value is 0 if the two operands are equal. If the left_operand is larger than the right_operand the return value is +1 and if the left_operand is less than the right_operand the return value is -1.
Divides the left_operand by the right_operand and returns the result. The optional scale sets the number of digits after the decimal place in the result.
Get the modulus of the left_operand using modulus.
Multiply the left_operand by the right_operand and returns the result. The optional scale sets the number of digits after the decimal place in the result.
Raise x to the power y. The optional scale can be used to set the number of digits after the decimal place in the result.
This function sets the default scale parameter for all subsequent bc math functions that do not explicitly specify a scale parameter.
Return the square root of the operand. The optional scale parameter sets the number of digits after the decimal place in the result.
Subtracts the right_operand from the left_operand and returns the result in a string. The optional scale parameter is used to set the number of digits after the decimal place in the result.
Returns an ASCII string containing the hexadecimal representation of str. The conversion is done byte-wise with the high-nibble first.
Returns the decimal equivalent of the binary number represented by the binary_string argument.
bindec() converts a binary number to an integer. The largest number that can be converted is 31 bits of 1's or 2147483647 in decimal.
The bindtextdomain() function sets the path for a domain.
Closes the bzip2 file referenced by the pointer bz.
bzcompress() compresses the source string and returns it as bzip2 encoded data.
The optional parameter blocksize specifies the blocksize used during compression and should be a number from 1 to 9 with 9 giving the best compression, but using more resources to do so. blocksize defaults to 4.
The optional parameter workfactor controls how the compression phase behaves when presented with worst case, highly repetitive, input data. The value can be between 0 and 250 with 0 being a special case and 30 being the default value. Regardless of the workfactor, the generated output is the same.
bzdecompress() decompresses the source string containing bzip2 encoded data and returns it. If the optional parameter small is TRUE , an alternative decompression algorithm will be used which uses less memory (the maximum memory requirement drops to around 2300K) but works at roughly half the speed.
Returns the error number of any bzip2 error returned by the file pointer bz.
Returns the error number and error string, in an associative array, of any bzip2 error returned by the file pointer bz.
Returns the error string of any bzip2 error returned by the file pointer bz.
Forces a write of all buffered bzip2 data for the file pointer bz.
Returns TRUE on success or FALSE on failure.
Opens a bzip2 (.bz2) file for reading or writing. filename is the name of the file to open. mode is similar to the fopen() function (`r' for read, `w' for write, etc.).
If the open fails, the function returns FALSE, otherwise it returns a pointer to the newly opened file.
bzread() reads up to length bytes from the bzip2 file pointer referenced by bz. Reading stops when length (uncompressed) bytes have been read or EOF is reached, whichever comes first. If the optional parameter length is not specified, bzread() will read 1024 (uncompressed) bytes at a time.
bzwrite() writes the contents of the string data to the bzip2 file stream pointed to by bz. If the optional length argument is given, writing will stop after length (uncompressed) bytes have been written or the end of string is reached, whichever comes first.
Strip whitespace from the end of a string. This function is an alias of rtrim().
Return a specific character. Returns a one-character string containing the character specified by ascii.
Split a string into smaller chunks
bool class_exists(string classname)
void closedir([resource dir_handle])
Create array containing variables and their values
Convert from one Cyrillic character set to another
Count elements in a variable
Return information about characters used in a string
Calculates the crc32 polynomial of a string
Creates an anonymous function, and returns its name (funny, eh?)
One-way string encryption (hashing)
Return the current element in an array
Define a new constant
Check whether a constant exists
Directory class with properties, handle and class and methods read, rewind and close.
Return the current key and value pair from an array and advance the array cursor
Output one or more strings.
echo() is not actually a function (it is a language construct) so you are not required to use parentheses with it.
In fact, if you want to pass more than one parameter to echo, you must not enclose the parameters within parentheses.
It is not possible to use echo() in a variable function context.
Set the internal pointer of an array to its last element
Note: preg_match(), which uses a Perl-compatible regular expression syntax, is often a faster alternative to ereg().
Searches a string for matches to the regular expression given in pattern.
If matches are found for parenthesized substrings of pattern and the function is called with the third argument regs,
the matches will be stored in the elements of the array regs.
$regs[1] will contain the substring which starts at the first left parenthesis;
$regs[2] will contain the substring starting at the second, and so on.
$regs[0] will contain a copy of the complete string matched.
Note: Up to (and including) PHP 4.1.0 $regs will be filled with exactly ten elements,
even though more or fewer than ten parenthesized substrings may actually have matched.
This has no effect on ereg()'s ability to match more substrings.
If no matches are found, $regs will not be altered by ereg().
Searching is case sensitive.
Returns TRUE if a match for pattern was found in string, or FALSE if no matches were found or an error occurred.
This function is identical to ereg() except that this ignores case distinction when matching alphabetic characters.
replace regular expression case insensitive
This function is identical to ereg_replace() except that this ignores case distinction when matching alphabetic characters.
Returns an array of strings, each of which is a substring of string formed by splitting it on boundaries formed by the string separator.
If limit is set, the returned array will contain a maximum of limit elements with the last element containing the rest of string.
If separator is an empty string (""), explode() will return FALSE. If separator contains a value that is not contained in string,
then explode() will return an array containing string.
Note: The limit parameter was added in PHP 4.0.1
Import variables into the current symbol table from an array
Checks whether a file exists
Returns TRUE if the file specified by filename exists; FALSE otherwise.
This function will not work on remote files; the file to be examined must be accessible via the server's filesystem.
The results of this function are cached. See clearstatcache() for more details.
Using Windows shares: On windows, use //computername/share/filename or \\\\computername\share\filename to check files on network shares.
Identical to file(), except that file_get_contents() returns the file in a string. On failure, file_get_contents() will return FALSE.
file_get_contents() is the preferred way to read the contents of a file into a string. It will use memory mapping techniques if supported by your OS to enhance performance.
Write a formatted string to a stream
Returns the translation table used by htmlspecialchars() and htmlentities()
Send a raw HTTP header
header() is used to send raw HTTP headers. See the HTTP/1.1 specification for more information on HTTP headers.
The optional replace parameter indicates whether the header should replace a previous similar header,
or add a second header of the same type.
By default it will replace, but if you pass in FALSE as the second argument you can force multiple headers of the same type.
The second optional http_response_code force the HTTP response code to the specified value.
(This parameter is available in PHP 4.3.0 and higher.)
There are two special-case header calls. The first is a header that starts with the string "HTTP/" (case is not significant),
which will be used to figure out the HTTP status code to send. For example,
if you have configured Apache to use a PHP script to handle requests for missing files
(using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.
Convert logical Hebrew text to visual text
Convert logical Hebrew text to visual text with newline conversion
Convert all HTML entities to their applicable characters
Convert all applicable characters to HTML entities
Convert special characters to HTML entities.
Certain characters have special significance in HTML,
and should be represented by HTML entities if they are to preserve their meanings.
This function returns a string with some of these conversions made;
the translations made are those most useful for everyday web programming.
If you require all HTML character entities to be translated, use htmlentities() instead.
This function is useful in preventing user-supplied text from containing HTML markup,
such as in a message board or guest book application.
The optional second argument, quote_style, tells the function what to do with single and double quote characters.
The default mode, ENT_COMPAT, is the backwards compatible mode which only translates
the double-quote character and leaves the single-quote untranslated.
If ENT_QUOTES is set, both single and double quotes are translated and
if ENT_NOQUOTES is set neither single nor double quotes are translated.
Join array elements with a string
Return TRUE if a value exists in an array
This function returns TRUE if the object is of this class or has this class as one of its parents, FALSE otherwise.
Join array elements with a string
Fetch a key from an associative array
Sort an array by key in reverse order
Sort an array by key
Calculate Levenshtein distance between two strings
Assign variables as if they were an array.
Like array(), this is not really a function, but a language construct.
list() is used to assign a list of variables in one operation.
Note: list() only works on numerical arrays and assumes the numerical indices start at 0.
Get numeric formatting information
Strip whitespace from the beginning of a string
Calculate the md5 hash of a string
Calculates the md5 hash of a given filename
Calculate the metaphone key of a string
Return current UNIX timestamp with microseconds
Returns the string "msec sec" where sec is the current time measured in the number of seconds
since the Unix Epoch (0:00:00 January 1, 1970 GMT), and msec is the microseconds part.
This function is only available on operating systems that support the gettimeofday() system call.
Both portions of the string are returned in units of seconds.
Formats a number as a currency string
mysql_affected_rows() returns the number of rows affected by the last INSERT,
UPDATE or DELETE query associated with link_identifier.
If the link identifier isn't specified, the last link opened by mysql_connect() is assumed.
Note: If you are using transactions, you need to call mysql_affected_rows()
after your INSERT, UPDATE, or DELETE query, not after the commit.
If the last query was a DELETE query with no WHERE clause,
all of the records will have been deleted from the table but this function will return zero.
Note: When using UPDATE, MySQL will not update columns where the new value is the same as the old value.
This creates the possiblity that mysql_affected_rows() may not actually equal the number of rows matched,
only the number of rows that were literally affected by the query.
mysql_affected_rows() does not work with SELECT statements; only on statements which modify records.
To retrieve the number of rows returned by a SELECT, use mysql_num_rows().
If the last query failed, this function will return -1.
Close MySQL connection
Open a connection to a MySQL Server
Create a MySQL database
Move internal result pointer
Get result data
Send a MySQL query
Returns TRUE on success or FALSE on failure.
mysql_drop_db() attempts to drop (remove) an entire database from the server
associated with the specified link identifier.
For downward compatibility mysql_dropdb() can also be used. This is deprecated, however.
Note: The function mysql_drop_db() is deprecated.
It is preferable to use mysql_query() to issue a SQL DROP DATABASE statement instead.
Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
Errors coming back from the MySQL database backend no longer issue warnings.
Instead, use mysql_errno() to retrieve the error code.
Note that this function only returns the error code from the most recently executed
MySQL function (not including mysql_error() and mysql_errno()), so if you want to use it,
make sure you check the value before calling another MySQL function.
Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
Errors coming back from the MySQL database backend no longer issue warnings.
Instead, use mysql_error() to retrieve the error text.
Note that this function only returns the error text from the most recently
executed MySQL function (not including mysql_error() and mysql_errno()),
so if you want to use it, make sure you check the value before calling another MySQL function.
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
mysql_fetch_array() is an extended version of mysql_fetch_row().
In addition to storing the data in the numeric indices of the result array,
it also stores the data in associative indices, using the field names as keys.
If two or more columns of the result have the same field names,
the last column will take precedence. To access the other column(s) of the same name,
you must use the numeric index of the column or make an alias for the column.
For aliased columns, you cannot access the contents with the original column name.
Returns an associative array that corresponds to the fetched row, or FALSE if there are no more rows.
mysql_fetch_assoc() is equivalent to calling mysql_fetch_array() with MYSQL_ASSOC
for the optional second parameter. It only returns an associative array.
This is the way mysql_fetch_array() originally worked.
If you need the numeric indices as well as the associative, use mysql_fetch_array().
If two or more columns of the result have the same field names, the last column will take precedence.
To access the other column(s) of the same name, you either need to access the result
with numeric indices by using mysql_fetch_row() or add alias names.
An important thing to note is that using mysql_fetch_assoc() is not significantly slower
than using mysql_fetch_row(), while it provides a significant added value.
Returns an object containing field information.
mysql_fetch_field() can be used in order to obtain information about fields in a certain query result.
If the field offset isn't specified, the next field that wasn't yet retrieved by mysql_fetch_field()
is retrieved.
The properties of the object are:
name - column name
table - name of the table the column belongs to
max_length - maximum length of the column
not_null - 1 if the column cannot be NULL
primary_key - 1 if the column is a primary key
unique_key - 1 if the column is a unique key
multiple_key - 1 if the column is a non-unique key
numeric - 1 if the column is numeric
blob - 1 if the column is a BLOB
type - the type of the column
unsigned - 1 if the column is unsigned
zerofill - 1 if the column is zero-filled
Get the length of each output in a result
Fetch a result row as an object
Get a result row as an enumerated array
Get the flags associated with the specified field in a result
Returns the length of the specified field
Get the name of the specified field in a result
Set result pointer to a specified field offset
Get name of the table the specified field is in
Get the type of the specified field in a result
Free result memory
Get MySQL client info
Get MySQL host info
Get MySQL protocol info
Get MySQL server info
Get information about the most recent query
Get the ID generated from the previous INSERT operation
List databases available on a MySQL server
List MySQL result fields
List MySQL processes
List tables in a MySQL database
Get number of fields in result
Get number of rows in result
Open a persistent connection to a MySQL server
Ping a server connection or reconnect if there is no connection
mysql_query() sends a query to the currently active database on the server
that's associated with the specified link identifier.
If link_identifier isn't specified, the last opened link is assumed.
If no link is open, the function tries to establish a link as if mysql_connect()
was called with no arguments, and use it.
The optional result_mode parameter can be MYSQL_USE_RESULT and MYSQL_STORE_RESULT.
It defaults to MYSQL_STORE_RESULT, so the result is buffered.
See also mysql_unbuffered_query() for the counterpart of this behaviour.
Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection.
Get result data
Select a MySQL database
Get current system status
Get table name of field
Return the current thread ID
mysql_unbuffered_query() sends a SQL query query to MySQL, without fetching and buffering the
result rows automatically, as mysql_query() does.
On the one hand, this saves a considerable amount of memory with SQL queries
that produce large result sets. On the other hand, you can start working on
the result set immediately after the first row has been retrieved: you don't
have to wait until the complete SQL query has been performed. When using multiple DB-connects,
you have to specify the optional parameter link_identifier.
The optional result_mode parameter can be MYSQL_USE_RESULT and MYSQL_STORE_RESULT.
It defaults to MYSQL_USE_RESULT, so the result is not buffered.
See also mysql_query() for the counterpart of this behaviour.
Sort an array using a case insensitive "natural order" algorithm
Sort an array using a "natural order" algorithm
Advance the internal array pointer of an array
Inserts HTML line breaks before all newlines in a string
Query language and locale information
Format a number with grouped thousands
Returns the ASCII value of the first character of string. This function complements chr().
Parses the string into variables
Returns a string containing the version of the currently running PHP parser.
Note: This information is also available in the predefined constant PHP_VERSION.
Get the current element from an array
Rewind the internal array pointer
Output a string.
Outputs arg. Returns TRUE on success or FALSE on failure.
print() is not actually a real function (it is a language construct) so you are not required to use parentheses with it.
Output a formatted string.
Convert a quoted-printable string to an 8 bit string
Quote meta characters
Create an array containing a range of elements
Set the internal pointer of an array to its first element
Sort an array in reverse order
Strip whitespace from the end of a string
Send a cookie
setcookie() defines a cookie to be sent along with the rest of the HTTP headers.
Like other headers, cookies must be sent before any output from your script (this is a protocol restriction).
This requires that you place calls to this function prior to any output, including <html> and <head> tags as well as any whitespace.
If output exists prior to calling this function, setcookie() will fail and return FALSE.
If setcookie() successfully runs, it will return TRUE.
This does not indicate whether the user accepted the cookie.
All the arguments except the name argument are optional.
If only the name argument is present, the cookie by that name will be deleted from the remote client.
You may also replace an argument with an empty string ("") in order to skip that argument.
Because the expire and secure arguments are integers, they cannot be skipped with an empty string, use a zero (0) instead.
Set locale information
Calculate the sha1 hash of a string
Calculates the sha1 hash of str using the US Secure Hash Algorithm 1, and returns that hash.
The hash is a 40-character hexadecimal number.
Calculate the sha1 hash of a file
Shuffle an array
Calculate the similarity between two strings
Get the number of elements in variable. The sizeof() function is an alias for count().
Sort an array. This function sorts an array. Elements will be arranged from lowest to highest when this function has completed.
Calculate the soundex key of a string
Return a formatted string
Parses input from a string according to a format
Pad a string to a certain length with another string
Repeat a string
Replace all occurrences of the search string with the replacement string
Perform the rot13 transform on a string.
This function performs the ROT13 encoding on the str argument and returns the resulting string.
The ROT13 encoding simply shifts every letter by 13 places in the alphabet while leaving non-alpha characters untouched.
Encoding and decoding are done by the same function, passing an encoded string as argument
will return the original version.
Randomly shuffles a string
Return information about words used in a string
Binary safe case-insensitive string comparison
Find the first occurrence of a character.This function is an alias for strstr(), and is identical in every way.
Binary safe string comparison.
Returns < 0 if str1 is less than str2; > 0 if str1 is greater than str2, and 0 if they are equal.
Note that this comparison is case sensitive.
Locale based string comparison
Find length of initial segment not matching mask
Strip HTML and PHP tags from a string
Un-quote string quoted with addcslashes()
Un-quote string quoted with addslashes()
Case-insensitive strstr()
Get string length
Case insensitive string comparisons using a "natural order" algorithm
String comparisons using a "natural order" algorithm
Binary safe case-insensitive string comparison of the first n characters
Binary safe string comparison of the first n characters
Find position of first occurrence of a string
Find the last occurrence of a character in a string
Reverse a string
Find position of last occurrence of a char in a string
Find length of initial segment matching mask
Find first occurrence of a string
Tokenize string
Make a string lowercase
Make a string uppercase
Translate certain characters
Returns part of a string
Count the number of substring occurrences
Replace text within a portion of a string
Strip whitespace from the beginning and end of a string
Sort an array with a user-defined comparison function and maintain index association
Make a string's first character uppercase
Uppercase the first character of each word in a string
Sort an array by keys using a user-defined comparison function
Sort an array by values using a user-defined comparison function
Output a formatted string
Output a formatted string
Wraps a string to a given number of characters using a string break character
==================================================
*Below this are the various PHP-specific keywords *
==================================================
=========================================================
*Below this are the various PHP-specific variable types *
=========================================================
===================================================
*Below this are the various PHP-specific constants *
===================================================