Array Introduction
The array functions allow you to access and manipulate arrays. Simple and multi-dimensional arrays are supported.Installation
The array functions are part of the PHP core. There is no installation needed to use these functions.Array Functions
Function | Description |
---|---|
array() | Creates an array |
array_change_key_case() | Changes all keys in an array to lowercase or uppercase |
array_chunk() | Splits an array into chunks of arrays |
array_column() | Returns the values from a single column in the input array |
array_combine() | Creates an array by using the elements from one "keys" array and one "values" array |
array_count_values() | Counts all the values of an array |
array_diff() | Compare arrays, and returns the differences (compare values only) |
array_diff_assoc() | Compare arrays, and returns the differences (compare keys and values) |
array_diff_key() | Compare arrays, and returns the differences (compare keys only) |
array_diff_uassoc() | Compare arrays, and returns the differences (compare keys and values, using a user-defined key comparison function) |
array_diff_ukey() | Compare arrays, and returns the differences (compare keys only, using a user-defined key comparison function) |
array_fill() | Fills an array with values |
array_fill_keys() | Fills an array with values, specifying keys |
array_filter() | Filters the values of an array using a callback function |
array_flip() | Flips/Exchanges all keys with their associated values in an array |
array_intersect() | Compare arrays, and returns the matches (compare values only) |
array_intersect_assoc() | Compare arrays and returns the matches (compare keys and values) |
array_intersect_key() | Compare arrays, and returns the matches (compare keys only) |
array_intersect_uassoc() | Compare arrays, and returns the matches (compare keys and values, using a user-defined key comparison function) |
array_intersect_ukey() | Compare arrays, and returns the matches (compare keys only, using a user-defined key comparison function) |
array_key_exists() | Checks if the specified key exists in the array |
array_keys() | Returns all the keys of an array |
array_map() | Sends each value of an array to a user-made function, which returns new values |
array_merge() | Merges one or more arrays into one array |
array_merge_recursive() | Merges one or more arrays into one array recursively |
array_multisort() | Sorts multiple or multi-dimensional arrays |
array_pad() | Inserts a specified number of items, with a specified value, to an array |
array_pop() | Deletes the last element of an array |
array_product() | Calculates the product of the values in an array |
array_push() | Inserts one or more elements to the end of an array |
array_rand() | Returns one or more random keys from an array |
array_reduce() | Returns an array as a string, using a user-defined function |
array_replace() | Replaces the values of the first array with the values from following arrays |
array_replace_recursive() | Replaces the values of the first array with the values from following arrays recursively |
array_reverse() | Returns an array in the reverse order |
array_search() | Searches an array for a given value and returns the key |
array_shift() | Removes the first element from an array, and returns the value of the removed element |
array_slice() | Returns selected parts of an array |
array_splice() | Removes and replaces specified elements of an array |
array_sum() | Returns the sum of the values in an array |
array_udiff() | Compare arrays, and returns the differences (compare values only, using a user-defined key comparison function) |
array_udiff_assoc() | Compare arrays, and returns the differences (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values) |
array_udiff_uassoc() | Compare arrays, and returns the differences (compare keys and values, using two user-defined key comparison functions) |
array_uintersect() | Compare arrays, and returns the matches (compare values only, using a user-defined key comparison function) |
array_uintersect_assoc() | Compare arrays, and returns the matches (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values) |
array_uintersect_uassoc() | Compare arrays, and returns the matches (compare keys and values, using two user-defined key comparison functions) |
array_unique() | Removes duplicate values from an array |
array_unshift() | Adds one or more elements to the beginning of an array |
array_values() | Returns all the values of an array |
array_walk() | Applies a user function to every member of an array |
array_walk_recursive() | Applies a user function recursively to every member of an array |
arsort() | Sorts an associative array in descending order, according to the value |
asort() | Sorts an associative array in ascending order, according to the value |
compact() | Create array containing variables and their values |
count() | Returns the number of elements in an array |
current() | Returns the current element in an array |
each() | Deprecated from PHP 7.2. Returns the current key and value pair from an array |
end() | Sets the internal pointer of an array to its last element |
extract() | Imports variables into the current symbol table from an array |
in_array() | Checks if a specified value exists in an array |
key() | Fetches a key from an array |
krsort() | Sorts an associative array in descending order, according to the key |
ksort() | Sorts an associative array in ascending order, according to the key |
list() | Assigns variables as if they were an array |
natcasesort() | Sorts an array using a case insensitive "natural order" algorithm |
natsort() | Sorts an array using a "natural order" algorithm |
next() | Advance the internal array pointer of an array |
pos() | Alias of current() |
prev() | Rewinds the internal array pointer |
range() | Creates an array containing a range of elements |
reset() | Sets the internal pointer of an array to its first element |
rsort() | Sorts an indexed array in descending order |
shuffle() | Shuffles an array |
sizeof() | Alias of count() |
sort() | Sorts an indexed array in ascending order |
uasort() | Sorts an array by values using a user-defined comparison function |
uksort() | Sorts an array by keys using a user-defined comparison function |
usort() | Sorts an array using a user-defined comparison function |
Parameter | Description |
---|---|
key | Specifies the key (numeric or string) |
value | Specifies the value |
Return Value: | Returns an array of the parameters |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 5.4, it is possible to use a short array syntax, which replaces array() with []. E.g. $cars=["Volvo","BMW"]; instead of $cars=array("Volvo","BMW"); |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
case | Optional. Possible values:
|
Return Value: | Returns an array with its keys in lowercase or uppercase, or FALSE if array is not an array |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
size | Required. An integer that specifies the size of each chunk |
preserve_key | Optional. Possible values:
|
Return Value: | Returns a multidimensional indexed array, starting with zero, with each dimension containing size elements |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
array | Required. Specifies the multi-dimensional array (record-set) to use. As of PHP 7.0, this can also be an array of objects. |
column_key | Required. An integer key or a string key name of the column of values to return. This parameter can also be NULL to return complete arrays (useful together with index_key to re-index the array) |
index_key | Optional. The column to use as the index/keys for the returned array |
Return Value: | Returns an array of values that represents a single column from the input array |
---|---|
PHP Version: | 5.5+ |
Parameter | Description |
---|---|
keys | Required. Array of keys |
values | Required. Array of values |
Return Value: | Returns the combined array. FALSE if number of elements does not match |
---|---|
PHP Version: | 5+ |
Changelog: | Versions before PHP 5.4 issues E_WARNING and returns FALSE for empty arrays |
Parameter | Description |
---|---|
array | Required. Specifying the array to count values of |
Return Value: | Returns an associative array, where the keys are the original array's values, and the values are the number of occurrences |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 4.3+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
index | Required. The first index of the returned array |
number | Required. Specifies the number of elements to insert |
value | Required. Specifies the value to use for filling the array |
Return Value: | Returns the filled array |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
keys | Required. Array of values that will be used as keys |
value | Required. Specifies the value to use for filling the array |
Return Value: | Returns the filled array |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to filter |
callbackfunction | Optional. Specifies the callback function to use |
flag | Optional. Specifies what arguments are sent to callback:
|
Return Value: | Returns the filtered array |
---|---|
PHP Version: | 4.0.6+ |
PHP Changelog: | PHP 5.6: Added optional flag parameter |
Parameter | Description |
---|---|
array | Required. Specifies an array of key/value pairs to be flipped |
Return Value: | Returns the flipped array on success. NULL on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
array1 | Required. The first array is the array that the others will be compared with |
array2 | Required. An array to be compared with the first array |
array3,... | Optional. An array to be compared with the first array |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 4.3.0+ |
Parameter | Description |
---|---|
array1 | Required. The first array is the array that the others will be compared with |
array2 | Required. An array to be compared with the first array |
array3,... | Optional. An array to be compared with the first array |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5.1.0+ |
Parameter | Description |
---|---|
array1 | Required. The first array is the array that the others will be compared with |
array2 | Required. An array to be compared with the first array |
array3,... | Optional. An array to be compared with the first array |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The first array is the array that the others will be compared with |
array2 | Required. An array to be compared with the first array |
array3,... | Optional. An array to be compared with the first array |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5.1.0+ |
Parameter | Description |
---|---|
key | Required. Specifies the key |
array | Required. Specifies an array |
Return Value: | Returns TRUE if the key exists and FALSE if the key does not exist |
---|---|
PHP Version: | 4.0.7+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
value | Optional. You can specify a value, then only the keys with this value are returned |
strict | Optional. Used with the value parameter. Possible values:
|
Return Value: | Returns an array containing the keys |
---|---|
PHP Version: | 4+ |
Changelog: | The strict parameter was added in PHP 5.0 |
Parameter | Description |
---|---|
myfunction | Required. The name of the user-made function, or null |
array1 | Required. Specifies an array |
array2 | Optional. Specifies an array |
array3 | Optional. Specifies an array |
Return Value: | Returns an array containing the values of array1, after applying the user-made function to each one |
---|---|
PHP Version: | 4.0.6+ |
Parameter | Description |
---|---|
array1 | Required. Specifies an array |
array2 | Optional. Specifies an array |
array3,... | Optional. Specifies an array |
Return Value: | Returns the merged array |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 5.0, this function only accept parameters of type array |
Parameter | Description |
---|---|
array1 | Required. Specifies an array |
array2 | Optional. Specifies an array |
array3,... | Optional. Specifies an array |
Return Value: | Returns the merged array |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
array1 | Required. Specifies an array |
sortorder | Optional. Specifies the sorting order. Possible values:
|
sorttype | Optional. Specifies the type to use, when comparing elements. Possible values:
|
array2 | Optional. Specifies an array |
array3 | Optional. Specifies an array |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.4: Added sorting type SORT_NATURAL and SORT_FLAG_CASE PHP 5.3: Added sorting type SORT_LOCALE_STRING |
Parameter | Description |
---|---|
array | Required. Specifies an array |
size | Required. Specifies the number of elements in the array returned from the function |
value | Required. Specifies the value of the new elements in the array returned from the function |
Return Value: | Returns an array with new elements |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
Return Value: | Returns the last value of array. If array is empty, or is not an array, NULL will be returned. |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
Return Value: | Returns the product as an integer or float |
---|---|
PHP Version: | 5.1.0+ |
Changelog: | As of PHP 5.3.6, the product of an empty array is 1. Before PHP 5.3.6, this function would return 0 for an empty array. |
Parameter | Description |
---|---|
array | Required. Specifies an array |
value1 | Optional. Specifies the value to add (Required in PHP versions before 7.3) |
value2 | Optional. Specifies the value to add |
Return Value: | Returns the new number of elements in the array |
---|---|
PHP Version: | 4+ |
Change log: | As of version 7.3 this function can be called with only the array parameter |
Parameter | Description |
---|---|
array | Required. Specifies an array |
number | Optional. Specifies how many random keys to return |
Return Value: | Returns a random key from an array, or an array of random keys if you specify that the function should return more than one key |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.1: rand() uses the Mersenne Twister random number generator PHP 5.2.1: The resulting array of keys is no longer shuffled PHP 4.2: The random number generator is seeded automatically |
Parameter | Description |
---|---|
array | Required. Specifies an array |
myfunction | Required. Specifies the name of the function |
initial | Optional. Specifies the initial value to send to the function |
Return Value: | Returns the resulting value |
---|---|
PHP Version: | 4.0.5+ |
PHP Changelog: | As of PHP 5.3.0, the initial parameter accepts multiple types (mixed). Versions prior to PHP 5.3.0, only allowed integer. |
Parameter | Description |
---|---|
array1 | Required. Specifies an array |
array2 | Optional. Specifies an array which will replace the values of array1 |
array3,... | Optional. Specifies more arrays to replace the values of array1 and array2, etc. Values from later arrays will overwrite the previous ones. |
Return Value: | Returns the replaced array, or NULL if an error occurs |
---|---|
PHP Version: | 5.3.0+ |
Parameter | Description |
---|---|
array1 | Required. Specifies an array |
array2 | Optional. Specifies an array which will replace the values of array1 |
array3,... | Optional. Specifies more arrays to replace the values of array1 and array2, etc. Values from later arrays will overwrite the previous ones. |
Return Value: | Returns the replaced array, or NULL if an error occurs |
---|---|
PHP Version: | 5.3.0+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
preserve | Optional. Specifies if the function should preserve the keys of the array or not. Possible values:
|
Return Value: | Returns the reversed array |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The preserve parameter was added in PHP 4.0.3 |
Parameter | Description |
---|---|
value | Required. Specifies the value to search for |
array | Required. Specifies the array to search in |
strict | Optional. If this parameter is set to TRUE, then this function will search for identical elements in the array. Possible values:
|
Return Value: | Returns the key of a value if it is found in the array, and FALSE otherwise. If the value is found in the array more than once, the first matching key is returned. |
---|---|
PHP Version: | 4.0.5+ |
PHP Changelog: | This function returns NULL if invalid parameters are passed to it (this applies to all PHP functions as of 5.3.0).As of PHP 4.2.0, this function returns FALSE on failure instead of NULL. |
Parameter | Description |
---|---|
array | Required. Specifies an array |
Return Value: | Returns the value of the removed element from an array, or NULL if the array is empty |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
start | Required. Numeric value. Specifies where the function will start the slice. 0 = the first element. If this value is set to a negative number, the function will start slicing that far from the last element. -2 means start at the second last element of the array. |
length | Optional. Numeric value. Specifies the length of the returned array. If this value is set to a negative number, the function will stop slicing that far from the last element. If this value is not set, the function will return all elements, starting from the position set by the start-parameter. |
preserve | Optional. Specifies if the function should preserve or reset the keys. Possible values: |
Return Value: | Returns selected parts of an array |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The preserve parameter was added in PHP 5.0.2 |
Parameter | Description |
---|---|
array | Required. Specifies an array |
start | Required. Numeric value. Specifies where the function will start removing elements. 0 = the first element. If this value is set to a negative number, the function will start that far from the last element. -2 means start at the second last element of the array. |
length | Optional. Numeric value. Specifies how many elements will be removed, and also length of the returned array. If this value is set to a negative number, the function will stop that far from the last element. If this value is not set, the function will remove all elements, starting from the position set by the start-parameter. |
array | Optional. Specifies an array with the elements that will be inserted to the original array. If it's only one element, it can be a string, and does not have to be an array. |
Return Value: | Returns the array consisting of the extracted elements |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies an array |
Return Value: | Returns the sum of all the values in an array |
---|---|
PHP Version: | 4.0.4+ |
PHP Changelog: | PHP versions prior to 4.2.1 modified the passed array itself and converted strings to numbers (which often converted them to zero, depending on their value) |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5.1.0+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunc_key | Required. The name of the user-defined function that compares the array keys.A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
myfunc_value | Required. The name of the user-defined function that compares the array values.A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument. |
Return Value: | Returns an array containing the entries from array1 that are not present in any of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunction | Required. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array1 | Required. The array to compare from |
array2 | Required. An array to compare against |
array3,... | Optional. More arrays to compare against |
myfunc_key | Required. The name of the user-defined function that compares the array keys.A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
myfunc_value | Required. The name of the user-defined function that compares the array values.A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument. |
Return Value: | Returns an array containing the entries from array1 that are present in all of the other arrays |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array | Required. Specifying an array |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | Returns the filtered array |
---|---|
PHP Version: | 4.0.1+ |
PHP Changelog: | PHP 7.2: If sorttype is SORT_STRING, this returns a new array and adds the unique elements. PHP 5.2.9: The default value of sorttype was changed to SORT_REGULAR. PHP 5.2.1: The default value of sorttype was changed back to SORT_STRING. |
Parameter | Description |
---|---|
array | Required. Specifying an array |
value1 | Optional. Specifies a value to insert (Required in PHP versions before 7.3) |
value2 | Optional. Specifies a value to insert |
value3 | Optional. Specifies a value to insert |
Return Value: | Returns the new number of elements in the array |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.3: This function can now be called with only the array parameter |
Parameter | Description |
---|---|
array | Required. Specifying an array |
Return Value: | Returns an array containing all the values of an array |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifying an array |
myfunction | Required. The name of the user-defined function |
parameter,... | Optional. Specifies a parameter to the user-defined function. You can assign one parameter to the function, or as many as you like |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifying an array |
myfunction | Required. The name of the user-defined function |
parameter,... | Optional. Specifies a parameter to the user-defined function. You can assign one parameter to the function, or as many as you like. |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
var1 | Required. Can be a string with the variable name, or an array of variables |
var2,... | Optional. Can be a string with the variable name, or an array of variables. Multiple parameters are allowed. |
Return Value: | Returns an array with all the variables added to it |
---|---|
PHP Version: | 4+ |
Change log: | As of version 7.3 this function issues an E_NOTICE level error if an unset variable is given |
Parameter | Description |
---|---|
array | Required. Specifies the array |
mode | Optional. Specifies the mode. Possible values:
|
Return Value: | Returns the number of elements in the array |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The mode parameter was added in PHP 4.2 |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the current element in an array, or FALSE on empty elements or elements with no value |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the current element key and value. This element key and value is returned in an array with four elements. Two elements (1 and Value) for the element value, and two elements (0 and Key) for the element key. This function returns FALSE if there are no more array elements |
---|---|
PHP Version: | 4+ |
PHP Changelog: | This functions has been deprecated as of PHP 7.2 |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the last element in the array on success, or FALSE if the array is empty |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
extract_rules | Optional. The extract() function checks for invalid variable names and collisions with existing variable names. This parameter specifies how invalid and colliding names are treated.Possible values:
|
prefix | Optional. If EXTR_PREFIX_SAME, EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID or EXTR_PREFIX_IF_EXISTS are used in the extract_rules parameter, a specified prefix is required. This parameter specifies the prefix. The prefix is automatically separated from the array key by an underscore character. |
Return Value: | Returns the number of variables extracted on success |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The extract_rules value EXTR_REFS was added in PHP 4.3. The extract_rules values EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS were added in PHP 4.2.As of PHP 4.0.5, this function now returns the number of variables extracted.The extract_rules value EXTR_PREFIX_INVALID was added in PHP 4.0.5.As of PHP 4.0.5, the extract_rules value EXTR_PREFIX_ALL now includes numeric variables as well. |
Parameter | Description |
---|---|
search | Required. Specifies the what to search for |
array | Required. Specifies the array to search |
type | Optional. If this parameter is set to TRUE, the in_array() function searches for the search-string and specific type in the array. |
Return Value: | Returns TRUE if the value is found in the array, or FALSE otherwise |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 4.2: The search parameter may now be an array |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the key of the array element that is currently being pointed to by the internal pointer |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
var1 | Required. The first variable to assign a value to |
var2,... | Optional. More variables to assign values to |
Return Value: | Returns the assigned array |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
Return Value: | Returns TRUE on success, or FALSE on failure. |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.2.1: Zero padded numeric strings (e.g., '00006') now ignore the 0 padding |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the next element in the array on success, or FALSE if there are no more elements |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the current element in an array, or FALSE on empty elements or elements with no value |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the previous element in the array on success, or FALSE if there are no more elements |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
low | Required. Specifies the lowest value of the array |
high | Required. Specifies the highest value of the array |
step | Optional. Specifies the increment used in the range. Default is 1 |
Return Value: | Returns an array of elements from low to high |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The step parameter was added in PHP 5.0.In PHP versions 4.1.0 through 4.3.2, this function sees numeric strings as strings and not integers. The numeric strings will be used for character sequences, e.g., "5252" is treated as "5".Support for character sequences and decrementing arrays was added in PHP 4.1.0. Character sequence values are limited to a length of one. If the length is higher than one, only the first character is used. Before this version, range() only generated incrementing integer arrays. |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns the value of the first element in the array on success, or FALSE if the array is empty |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to use |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 4.2: The random number generator is seeded automatically |
Parameter | Description |
---|---|
array | Required. Specifies the array |
mode | Optional. Specifies the mode. Possible values:
|
Return Value: | Returns the number of elements in the array |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
sorttype | Optional. Specifies how to compare the array elements/items. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
myfunction | Optional. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
myfunction | Optional. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
array | Required. Specifies the array to sort |
myfunction | Optional. A string that define a callable comparison function. The comparison function must return an integer <, =, or > than 0 if the first argument is <, =, or > than the second argument |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
Function | Description |
---|---|
cal_days_in_month() | Returns the number of days in a month for a specified year and calendar |
cal_from_jd() | Converts a Julian Day Count into a date of a specified calendar |
cal_info() | Returns information about a specified calendar |
cal_to_jd() | Converts a date in a specified calendar to Julian Day Count |
easter_date() | Returns the Unix timestamp for midnight on Easter of a specified year |
easter_days() | Returns the number of days after March 21, that the Easter Day is in a specified year |
frenchtojd() | Converts a French Republican date to a Julian Day Count |
gregoriantojd() | Converts a Gregorian date to a Julian Day Count |
jddayofweek() | Returns the day of the week |
jdmonthname() | Returns a month name |
jdtofrench() | Converts a Julian Day Count to a French Republican date |
jdtogregorian() | Converts a Julian Day Count to a Gregorian date |
jdtojewish() | Converts a Julian Day Count to a Jewish date |
jdtojulian() | Converts a Julian Day Count to a Julian date |
jdtounix() | Converts Julian Day Count to Unix timestamp |
jewishtojd() | Converts a Jewish date to a Julian Day Count |
juliantojd() | Converts a Julian date to a Julian Day Count |
unixtojd() | Converts Unix timestamp to Julian Day Count |
Constant | Type | PHP Version |
---|---|---|
CAL_GREGORIAN | Integer | PHP 4 |
CAL_JULIAN | Integer | PHP 4 |
CAL_JEWISH | Integer | PHP 4 |
CAL_FRENCH | Integer | PHP 4 |
CAL_NUM_CALS | Integer | PHP 4 |
CAL_DOW_DAYNO | Integer | PHP 4 |
CAL_DOW_SHORT | Integer | PHP 4 |
CAL_DOW_LONG | Integer | PHP 4 |
CAL_MONTH_GREGORIAN_SHORT | Integer | PHP 4 |
CAL_MONTH_GREGORIAN_LONG | Integer | PHP 4 |
CAL_MONTH_JULIAN_SHORT | Integer | PHP 4 |
CAL_MONTH_JULIAN_LONG | Integer | PHP 4 |
CAL_MONTH_JEWISH | Integer | PHP 4 |
CAL_MONTH_FRENCH | Integer | PHP 4 |
CAL_EASTER_DEFAULT | Integer | PHP 4.3 |
CAL_EASTER_ROMAN | Integer | PHP 4.3 |
CAL_EASTER_ALWAYS_GREGORIAN | Integer | PHP 4.3 |
CAL_EASTER_ALWAYS_JULIAN | Integer | PHP 4.3 |
CAL_JEWISH_ADD_ALAFIM_GERESH | Integer | PHP 5.0 |
CAL_JEWISH_ADD_ALAFIM | Integer | PHP 5.0 |
CAL_JEWISH_ADD_GERESHAYIM | Integer | PHP 5.0 |
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to use. Look at the PHP Calendar Constants |
month | Required. Specifies the month in the selected calendar |
year | Required. Specifies the year in the selected calendar |
Return Value: | The number of days in the selected month, in the given year and calendar |
---|---|
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
jd | Required. Specifies a Julian Day as an integer |
calendar | Required. Specifies the calendar to convert to. Must be one of the following values:
|
Return Value: | Returns an array that contains calendar information like:
|
---|---|
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
calendar | Optional. Specifies a number that indicates which calendar to return information about:
|
Return Value: | Returns an array containing calendar elements like:
|
---|---|
PHP Version: | 4.1+ |
Changelog: | In PHP 5.0 the calendar parameter became optional |
Parameter | Description |
---|---|
calendar | Required. Specifies the calendar to convert from. Must be one of the following values:
|
month | Required. Specifies the month as a number |
day | Required. Specifies the day as a number |
year | Required. Specifies the year as a number |
Return Value: | Returns a Julian Day number |
---|---|
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
year | Optional. Specifies a year between 1970 and 2037. Default is the current year, local time |
Return Value: | Returns the easter date as a unix timestamp |
---|---|
PHP Version: | 4+ |
Changelog: | In PHP 4.3 the year parameter became optional |
Parameter | Description |
---|---|
year | Optional. Specifies a year as a number. Default is the current year, local time |
method | Optional. Allows you to calculate easter dates based on other calendars. E.g. it uses the Gregorian calendar during the years 1582 - 1752 when set to CAL_EASTER_ROMAN |
Return Value: | Returns the number of days after March 21, that the Easter Day is in the given year |
---|---|
PHP Version: | 4+ |
Changelog: | In PHP 4.3 the year parameter became optional and the method parameter was added |
Parameter | Description |
---|---|
month | Required. Specifies the month as a number from 1 to 13 |
day | Required. Specifies the day as a number from 1 to 30 |
year | Required. Specifies the year as a number from 1 to 14 |
Return Value: | Returns a Julian Day number |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
month | Required. Specifies the month as a number from 1 to 12 |
day | Required. Specifies the day as a number from 1 to 31 |
year | Required. Specifies the year as a number between -4714 and 9999 |
Return Value: | Returns a Julian Day number |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
mode | Optional. Specifies how to return the weekday. Can have one of the following values:
|
Return Value: | Returns the Gregorian weekday as a string or integer (depends on the mode parameter) |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
mode | Optional. Specifies which calendar to convert the Julian Day Count to, and how the month name is to be returned. Mode values:
|
Return Value: | Returns the month name for the specified Julian Day and calendar |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
Return Value: | Returns a French Republican date in format "month/day/year" |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
Return Value: | Returns a Gregorian date in format "month/day/year" |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
hebrew | Optional. When set to TRUE it indicates Hebrew output format. FALSE is default |
fl | Optional. Defines the Hebrew output format. The available formats are:
|
Return Value: | Returns a Jewish date in format "month/day/year" |
---|---|
PHP Version: | 4+ |
Changelog: | The hebrew parameter was added in PHP 4.3, and the fl parameter was added in PHP 5.0 |
Parameter | Description |
---|---|
jd | Required. A Julian Day number |
Return Value: | Returns a Julian date in format "month/day/year" |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
jd | Required. A Julian Day number between 2440588 and 2465342 |
Return Value: | Returns the Unix timestamp for the start of the specified Julian day |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
month | Required. Specifies the month as a number from 1 to 13 |
day | Required. Specifies the day as a number from 1 to 30 |
year | Required. Specifies the year as a number between 1 and 9999 |
Return Value: | Returns a Julian Day number |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
month | Required. Specifies the month as a number from 1 to 12 |
day | Required. Specifies the day as a number from 1 to 31 |
year | Required. Specifies the year as a number between -4713 and 9999 |
Return Value: | Returns a Julian Day number |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
timestamp | Optional. Specifies A unix timestamp to convert |
Return Value: | Returns the Julian Day number for a Unix timestamp (seconds since 1.1.1970), or for the current day if no timestamp is given |
---|---|
PHP Version: | 4+ |
Name | Description | Default | PHP Version |
---|---|---|---|
date.timezone | The default timezone (used by all date/time functions) | " | PHP 5.1 |
date.default_latitude | The default latitude (used by date_sunrise() and date_sunset()) | "31.7667" | PHP 5.0 |
date.default_longitude | The default longitude (used by date_sunrise() and date_sunset()) | "35.2333" | PHP 5.0 |
date.sunrise_zenith | The default sunrise zenith (used by date_sunrise() and date_sunset()) | "90.83" | PHP 5.0 |
date.sunset_zenith | The default sunset zenith (used by date_sunrise() and date_sunset()) | "90.83" | PHP 5.0 |
Function | Description |
---|---|
checkdate() | Validates a Gregorian date |
date_add() | Adds days, months, years, hours, minutes, and seconds to a date |
date_create_from_format() | Returns a new DateTime object formatted according to a specified format |
date_create() | Returns a new DateTime object |
date_date_set() | Sets a new date |
date_default_timezone_get() | Returns the default timezone used by all date/time functions |
date_default_timezone_set() | Sets the default timezone used by all date/time functions |
date_diff() | Returns the difference between two dates |
date_format() | Returns a date formatted according to a specified format |
date_get_last_errors() | Returns the warnings/errors found in a date string |
date_interval_create_from_date_string() | Sets up a DateInterval from the relative parts of the string |
date_interval_format() | Formats the interval |
date_isodate_set() | Sets the ISO date |
date_modify() | Modifies the timestamp |
date_offset_get() | Returns the timezone offset |
date_parse_from_format() | Returns an associative array with detailed info about a specified date, according to a specified format |
date_parse() | Returns an associative array with detailed info about a specified date |
date_sub() | Subtracts days, months, years, hours, minutes, and seconds from a date |
date_sun_info() | Returns an array containing info about sunset/sunrise and twilight begin/end, for a specified day and location |
date_sunrise() | Returns the sunrise time for a specified day and location |
date_sunset() | Returns the sunset time for a specified day and location |
date_time_set() | Sets the time |
date_timestamp_get() | Returns the Unix timestamp |
date_timestamp_set() | Sets the date and time based on a Unix timestamp |
date_timezone_get() | Returns the time zone of the given DateTime object |
date_timezone_set() | Sets the time zone for the DateTime object |
date() | Formats a local date and time |
getdate() | Returns date/time information of a timestamp or the current local date/time |
gettimeofday() | Returns the current time |
gmdate() | Formats a GMT/UTC date and time |
gmmktime() | Returns the Unix timestamp for a GMT date |
gmstrftime() | Formats a GMT/UTC date and time according to locale settings |
idate() | Formats a local time/date as integer |
localtime() | Returns the local time |
microtime() | Returns the current Unix timestamp with microseconds |
mktime() | Returns the Unix timestamp for a date |
strftime() | Formats a local time and/or date according to locale settings |
strptime() | Parses a time/date generated with strftime() |
strtotime() | Parses an English textual datetime into a Unix timestamp |
time() | Returns the current time as a Unix timestamp |
timezone_abbreviations_list() | Returns an associative array containing dst, offset, and the timezone name |
timezone_identifiers_list() | Returns an indexed array with all timezone identifiers |
timezone_location_get() | Returns location information for a specified timezone |
timezone_name_from_ abbr() | Returns the timezone name from abbreviation |
timezone_name_get() | Returns the name of the timezone |
timezone_offset_get() | Returns the timezone offset from GMT |
timezone_open() | Creates new DateTimeZone object |
timezone_transitions_get() | Returns all transitions for the timezone |
timezone_version_get() | Returns the version of the timezonedb |
Constant | Description |
---|---|
DATE_ATOM | Atom (example: 2019-01-18T14:13:03+00:00) |
DATE_COOKIE | HTTP Cookies (example: Fri, 18 Jan 2019 14:13:03 UTC) |
DATE_ISO8601 | ISO-8601 (example: 2019-01-18T14:13:03+0000) |
DATE_RFC822 | RFC 822 (example: Fri, 18 Jan 2019 14:13:03 +0000) |
DATE_RFC850 | RFC 850 (example: Friday, 18-Jan-19 14:13:03 UTC) |
DATE_RFC1036 | RFC 1036 (example: Friday, 18-Jan-19 14:13:03 +0000) |
DATE_RFC1123 | RFC 1123 (example: Fri, 18 Jan 2019 14:13:03 +0000) |
DATE_RFC2822 | RFC 2822 (example: Fri, 18 Jan 2019 14:13:03 +0000) |
DATE_RFC3339 | Same as DATE_ATOM (since PHP 5.1.3) |
DATE_RFC3339_EXTENDED | RFC3339 Extended format (since PHP 7.0.0) (example: 2019-01-18T16:34:01.000+00:00) |
DATE_RSS | RSS (Fri, 18 Jan 2019 14:13:03 +0000) |
DATE_W3C | World Wide Web Consortium (example: 2019-01-18T14:13:03+00:00) |
SUNFUNCS_RET_TIMESTAMP | Timestamp (since PHP 5.1.2) |
SUNFUNCS_RET_STRING | Hours:minutes (example: 09:41) (since PHP 5.1.2) |
SUNFUNCS_RET_DOUBLE | Hours as a floating point number (example: 9.75) (since PHP 5.1.2) |
Parameter | Description |
---|---|
month | Required. Specifies the month as a number between 1 and 12 |
day | Required. Specifies the day as a number between 1 and 31 |
year | Required. Specifies the year as a number between 1 and 32767 |
Return Value: | TRUE if the date is valid. FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
interval | Required. Specifies a DateInterval object |
Return Value: | Returns a DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
format | Required. Specifies the format to use. The following characters can be used in the format parameter string:
|
time | Required. Specifies a date/time string. NULL indicates the current date/time |
timezone | Optional. Specifies the timezone of time. Default is the current timezone |
Return Value: | Returns a new DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
time | Optional. Specifies a date/time string. NULL indicates the current time |
timezone | Optional. Specifies the timezone of time. Default is the current timezone.Tip: Look at a list of all supported timezones in PHP |
Return Value: | Returns a new DateTime object on success. FALSE/Exception on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 7.1: Microseconds is now filled with actual value, not just "00000".PHP 5.3: An exception is thrown if time is an invalid value. Previously an error was thrown |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
year | Required. Specifies the year of the date |
month | Required. Specifies the month of the date |
day | Required. Specifies the day of the date |
Return Value: | Returns a new DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.3: The return value was changed from NULL to DateTime (on success) |
Return Value: | Returns the timezone as a string |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 5.4: The TZ variable is no longer used to guess the timezone |
Parameter | Description |
---|---|
timezone | Required. Specifies the timezone to use, like "UTC" or "Europe/Paris". List of valid timezones: http://www.php.net/manual/en/timezones.php |
Return Value: | Returns FALSE if the timezone is not valid. TRUE otherwise |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 5.3: Throws an E_WARNING instead of E_STRICT.PHP 5.1.2: Started to validate the timezone parameter. |
Parameter | Description |
---|---|
datetime1 | Required. Specifies a DateTime object |
datetime2 | Required. Specifies a DateTime object |
absolute | Optional. Specifies a Boolean value. TRUE indicates that the interval/difference MUST be positive. Default is FALSE |
Return Value: | Returns a DateInterval object on success that represents the difference between the two dates. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
format | Required. Specifies the format for the date. The following characters can be used:
|
Return Value: | Returns the formatted date as a string. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Return Value: | Returns an array that contains information about the errors/warnings |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
datetime | Required. Specifies a DateInterval |
Return Value: | Returns new DateInterval object |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
format | Required. Specifies the format. The following characters can be used in the format parameter string:
|
Return Value: | Returns the formatted interval |
---|---|
PHP Version: | 5.3+ |
PHP Changelog: | PHP 7.1: Added the F and f parameters |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
year | Required. Specifies the year of the date |
week | Required. Specifies the week of the date |
day | Optional. Specifies the offset from the first day of the week. Default is 1 |
Return Value: | Returns a DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.3: Changed the return value from NULL to DateTime |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
modify | Required. Specifies a date/time string |
Return Value: | Returns a DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.3: Changed the return value from NULL to DateTime |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
Return Value: | Returns the timezone offset in seconds from UTC on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
format | Required. Specifies the format (a format accepted by date_create_from_format()) |
date | Required. A string that specifies a date |
Return Value: | Returns an associative array containing information about the specified date on success |
---|---|
PHP Version: | 5.3+ |
PHP Changelog: | PHP 7.2: The [zone] element of the returned array now represents seconds instead of minutes. It also has its sign inverted: -120 is now 7200. |
Parameter | Description |
---|---|
date | Required. Specifies a date (in a format accepted by strtotime()) |
Return Value: | Returns an associative array containing information about the parsed date on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
interval | Required. Specifies a DateInterval object |
Return Value: | Returns a DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
timestamp | Required. Specifies a timestamp |
latitude | Required. Specifies the latitude in degrees |
longitude | Required. Specifies the longitude in degrees |
Return Value: | Returns an array on success. FALSE on failure |
---|---|
PHP Version: | 5.1.2+ |
Parameter | Description |
---|---|
timestamp | Required. Specifies the timestamp of the day from which the sunrise time is taken |
format |
Optional. Specifies how to return the result:
|
latitude | Optional. Specifies the latitude of the location. Defaults to North. To specify a value for South, pass in a negative value |
longitude | Optional. Specifies the longitude of the location. Defaults to East. To specify a value for West, pass in a negative value |
zenith | Optional. Defaults to date.sunrise_zenith |
gmtoffset | Optional. Specifies the difference between GMT and local time in hours |
Return Value: | Returns the time of the sunrise, in the specified format, on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.1: This function now issues E_STRICT and E_NOTICE time zone errors |
Parameter | Description |
---|---|
timestamp | Required. Specifies the timestamp of the day from which the sunset time is taken |
format |
Optional. Specifies how to return the result:
|
latitude | Optional. Specifies the latitude of the location. Defaults to North. To specify a value for South, pass in a negative value |
longitude | Optional. Specifies the longitude of the location. Defaults to East. To specify a value for West, pass in a negative value |
zenith | Optional. Defaults to date.sunset_zenith |
gmtoffset | Optional. Specifies the difference between GMT and local time in hours |
Return Value: | Returns the time of the sunset, in the specified format, on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Changelog: | From PHP 5.1.0 this function generates E_STRICT and E_NOTICE time zone errors |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
hour | Required. Specifies the hour of the time |
minute | Required. Specifies the minute of the time |
second | Optional. Specifies the second of the time. Default is 0 |
microseconds | Optional. Specifies the microsecond of the time. Default is 0 |
Return Value: | Returns a DateTime object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 7.1: Added microseconds parameterPHP 5.3: Changed the return value from NULL to DateTime |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create() |
Return Value: | Returns the Unix timestamp that represents the date |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). This function modifies this object |
unixtimestamp | Required. Specifies a Unix timestamp representing the date |
Return Value: | Returns the DateTime object for method chaining. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). |
Return Value: | Returns a DateTimeZone object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTime object returned by date_create(). This function modifies this object |
timezone | Required. Specifies a DateTimeZone object that represents the desired time zone.Tip: Look at a list of all supported timezones in PHP |
Return Value: | Returns the DateTime object for method chaining. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Changelog: | PHP 5.3: Changed the return value from NULL to DateTime (on success) |
Parameter | Description |
---|---|
format | Required. Specifies the format of the outputted date string. The following characters can be used:
|
timestamp | Optional. Specifies an integer Unix timestamp. Default is the current local time (time()) |
Return Value: | Returns a formatted date string on success. FALSE on failure + an E_WARNING |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.1.0: Added E_STRICT and E_NOTICE time zone errors. Valid range of timestamp is now from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. Before version 5.1.0 timestamp was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).PHP 5.1.1: Added constants of standard date/time formats that can be used to specify the format parameter |
Parameter | Description |
---|---|
timestamp | Optional. Specifies an integer Unix timestamp. Default is the current local time (time()) |
Return Value: | Returns an associative array with information related to the timestamp: |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
return_float | Optional. When set to TRUE, a float instead of an array is returned. Default is FALSE |
Return Value: | Returns an associative array by default, with the following array keys:
|
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.1.0: Added the return_float parameter |
Parameter | Description |
---|---|
format | Required. Specifies the format of the outputted date string. The following characters can be used:
|
timestamp | Optional. Specifies an integer Unix timestamp. Default is the current local time (time()) |
Return Value: | Returns a formatted date string on success. FALSE on failure + an E_WARNING |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.1: Valid range of timestamp is now from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. Before version 5.1 timestamp was limited from 01-01-1970 to 19-01-2038 on some systems (e.g. Windows).PHP 5.1.1: Added the constants of standard date/time formats that can be used to specify the format parameter |
Parameter | Description |
---|---|
hour | Optional. Specifies the hour |
minute | Optional. Specifies the minute |
second | Optional. Specifies the second |
month | Optional. Specifies the month |
day | Optional. Specifies the day |
year | Optional. Specifies the year |
is_dst | Optional. Parameters always represent a GMT date so is_dst doesn't influence the result. Note: This parameter is removed in PHP 7.0. The new timezone handling features should be used instead |
Return Value: | Returns an integer Unix timestamp |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.1: The is_dst parameter was deprecatedPHP 7.0: The is_dst parameter was removed |
Parameter | Description |
---|---|
format | Required. Specifies how to return the result:
|
timestamp | Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) |
Return Value: | Returns a string formatted according format using the given timestamp. Month and weekday names and other language-dependent strings respect the current locale set with setlocale() |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
format | Required. Specifies how to return the result. One of the following
characters is allowed:
|
timestamp | Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) |
Return Value: | Returns an integer formatted according the specified format using the given timestamp |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.1: Now issues E_STRICT and E_NOTICE time zone errors |
Parameter | Description |
---|---|
timestamp | Optional. Specifies a Unix timestamp that defaults to the current local time, time(), if no timestamp is specified |
is_assoc | Optional. Specifies whether to return an associative or indexed array. FALSE = the array returned is an indexed array. TRUE = the array returned is an associative array. FALSE is default.
The keys of the associative array are:
|
Return Value: | Returns an array that contains the components of a Unix timestamp |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.1: Now issues E_STRICT and E_NOTICE time zone errors |
Parameter | Description |
---|---|
return_float | Optional. When set to TRUE it specifies that the function should return a float, instead of a string. Default is FALSE |
Return Value: | Returns the string "microsec sec" by default, where sec is the number of seconds since the Unix Epoch (0:00:00 January 1, 1970 GMT), and microsec is the microseconds part. If the return_float parameter is set to TRUE, it returns a float representing the current time in seconds since the Unix epoch accurate to the nearest microsecond |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.0: Added the return_float parameter |
Parameter | Description |
---|---|
hour | Optional. Specifies the hour |
minute | Optional. Specifies the minute |
second | Optional. Specifies the second |
month | Optional. Specifies the month |
day | Optional. Specifies the day |
year | Optional. Specifies the year |
is_dst | Optional. Set this parameter to 1 if the time is during daylight savings time (DST), 0 if it is not, or -1 (the default) if it is unknown. If it's unknown, PHP tries to find out itself (which may cause unexpected results). Note: This parameter is removed in PHP 7.0. The new timezone handling features should be used instead |
Return Value: | Returns an integer Unix timestamp. FALSE on error |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.1: The is_dst parameter is removed.PHP 5.3.0: Throws E_DEPRECATED if the is_dst parameter is used PHP 5.1: The is_dst parameter was deprecated. If mktime() is called with no arguments, it now throws E_STRICT notice. Use the time() function instead. |
Parameter | Description |
---|---|
format | Required. Specifies how to return the result:
|
timestamp | Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time()) |
Return Value: | Returns a string formatted according format using the given timestamp. Month and weekday names and other language-dependent strings respect the current locale set with setlocale() |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.1: Now issues E_STRICT and E_NOTICE time zone errors |
Parameter | Description |
---|---|
date | Required. The string to parse (e.g. returned from strftime()) |
format | Required. Specifies the format used in the date:
|
Return Value: | This function returns an array with the date parsed on success. FALSE on failure.
The meaning of the returning array keys are:
|
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
time | Required. Specifies a date/time string |
now | Optional. Specifies the timestamp used as a base for the calculation of relative dates |
Return Value: | Returns a timestamp on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.3.0: Relative time formats such as this week, previous week, last week, and next week now interprets a week period of Monday through Sunday, rather then a 7-day period relative to the current date/timePHP 5.3.0: Now 24:00 is a valid formatPHP 5.2.7: In earlier versions, if requesting a given occurrence of a given weekday in a month where that weekday was the first day of the month it would incorrectly add one week to the returned timestamp. This has been corrected nowPHP 5.1.0: Returns FALSE on failure (earlier versions returns -1), and issues E_STRICT and E_NOTICE time zone errorsPHP 5.0.2: Now correctly computes "now" and other relative times from current time, not from today's midnight PHP 5.0.0: Allows microseconds (but they are ignored) |
Return Value: | Returns an integer containing the current time as a Unix timestamp |
---|---|
PHP Version: | 4+ |
Return Value: | Returns an associative array on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
what | Optional. Specifies a DateTimeZone class constant1 = AFRICA2 = AMERICA4 = ANTARCTICA8 = ARCTIC16 = ASIA32 = ATLANTIC 64 = AUSTRALIA128 = EUROPE256 = INDIAN512 = PACIFIC1024 = UTC2047 = ALL4095 = ALL_WITH_BC4096 = PER_COUNTRY |
country | Optional. Specifies a two-letter ISO 3166-1 compatible country code |
Return Value: | Returns an indexed array on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.3: The optional what and country parameters were added |
Parameter | Description |
---|---|
object | Required. Specifies a DateTimeZone object returned by timezone_open() |
Return Value: | Returns an array that contains location information for the timezone |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
abbr | Required. Specifies the timezone abbreviation |
gmtoffset | Optional. Specifies the offset from GMT in seconds. Default is -1, which means that first found timezone corresponding to abbr is returned. Otherwise exact offset is searched. If not found, the first timezone with any offset is returned |
isdst |
Optional. Specifies daylight saving time indicator.
|
Return Value: | Returns the timezone name on success. FALSE on failure |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTimeZone object |
Return Value: | Returns a timezone name from the list of timezones |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
object | Required. Specifies a DateTimeZone object returned by timezone_open() |
datetime | Required. Specifies a date/time to compute the offset from |
Return Value: | Returns the timezone offset in seconds on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
timezone | Required. Specifies a timezoneTip: Look at a list of all supported timezones in PHP |
Return Value: | Returns the DateTimeZone object on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.5.1: The timezone parameter accepts offset values |
Parameter | Description |
---|---|
object | Required (for procedural style). Specifies a DateTimeZone object |
timestamp_start | Optional. Begin timestamp |
timestamp_end | Optional. End timestamp |
Return Value: | A numerically indexed array containing associative array with all transitions on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.3: Added timestamp_begin and timestamp_end parameters |
Return Value: | Returns the version of the timezonedb as a string |
---|---|
PHP Version: | 5.3+ |
Function | Description |
---|---|
chdir() | Changes the current directory |
chroot() | Changes the root directory |
closedir() | Closes a directory handle |
dir() | Returns an instance of the Directory class |
getcwd() | Returns the current working directory |
opendir() | Opens a directory handle |
readdir() | Returns an entry from a directory handle |
rewinddir() | Resets a directory handle |
scandir() | Returns an array of files and directories of a specified directory |
Parameter | Description |
---|---|
directory | Required. Specifies the new current directory |
Return Value: | TRUE on success. FALSE on failure. Throws an error of level E_WARNING on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
directory | Required. Specifies the path to change the root directory to |
Return Value: | TRUE on success. FALSE on failure. |
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
dir | Optional. Specifies the directory handle resource previously opened with opendir(). If this parameter is not specified, the last link opened by opendir() is assumed |
Return Value: | - |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
directory | Required. Specifies the directory to open |
context | Optional. |
Return Value: | An instance of the Directory class. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Return Value: | The current working directory on success, FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
path | Required. Specifies the directory path to be opened |
context | Optional. Specifies the context of the directory handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | Returns the directory handle resource on success. FALSE on failure. Throws an error of level E_WARNING if path is not a valid directory, or if the directory cannot be opened due to permission restrictions or filesysytem errors. You can hide the error output of opendir() by adding '@' to the front of the function name |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.0: The path parameter now supports the ftp:// URL wrapper |
Parameter | Description |
---|---|
dir | Optional. Specifies the directory handle resource previously opened with opendir(). If this parameter is not specified, the last link opened by opendir() is assumed |
Return Value: | The entry name (filename) on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
dir | Optional. Specifies the directory handle resource previously opened with opendir(). If this parameter is not specified, the last link opened by opendir() is assumed |
Return Value: | NULL on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
directory | Required. Specifies the directory to be scanned |
order | Optional. Specifies the sorting order. Default sort order is alphabetical in ascending order (0). Set to SCANDIR_SORT_DESCENDING or 1 to sort in alphabetical descending order, or SCANDIR_SORT_NONE to return the result unsorted |
context | Optional. Specifies the context of the directory handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | An array of files and directories on success, FALSE on failure. Throws an E_WARNING if directory is not a directory |
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | PHP 5.4: The order constants were added |
Name | Default | Description | Changeable |
---|---|---|---|
error_reporting | NULL | Sets the error reporting level (either an integer or named constants) | PHP_INI_ALL |
display_errors | "1" | Specifies whether errors should be printed to the screen, or if they should be hidden from the user.Note: This feature should never be used on production systems (only to support your development) | PHP_INI_ALL |
display_startup_errors | "0" | Even when display_errors is on, errors that occur during PHP's startup sequence are not displayedNote: It is strongly recommended to keep display_startup_errors off, except for debugging | PHP_INI_ALL |
log_errors | "0" | Defines whether script error messages should be logged to the server's error log or error_log. Note: It is strongly advised to use error logging instead of error displaying on production web sites | PHP_INI_ALL |
log_errors_max_len | "1024" | Sets the maximum length of log_errors in bytes. The value "0" can be used to not apply any maximum length at all. This length is applied to logged errors, displayed errors, and also to $php_errormsg (available since PHP 4.3) | PHP_INI_ALL |
ignore_repeated_errors | "0" | Specifies whether to log repeated error messages. When set to "1" it will not log errors with repeated errors from the same file on the same line (available since PHP 4.3) | PHP_INI_ALL |
ignore_repeated_source | "0" | Specifies whether to log repeated error messages. When set to "1" it will not log errors with repeated errors from different files or source lines (available since PHP 4.3) | PHP_INI_ALL |
report_memleaks | "1" | If set to "1" (the default), this parameter will show a report of memory leaks detected by the Zend memory manager (available since PHP 4.3) | PHP_INI_ALL |
track_errors | "0" | If set to "1", the last error message will always be present in the variable $php_errormsg | PHP_INI_ALL |
html_errors | "1" | Turns off HTML tags in error messages | PHP_INI_ALLPHP_INI_SYSTEM in PHP <= 4.2.3. |
xmlrpc_errors | "0" | Turns off normal error reporting and formats errors as XML-RPC error message (available since PHP 4.1) | PHP_INI_SYSTEM |
xmlrpc_error_number | "0" | Used as the value of the XML-RPC faultCode element (available since PHP 4.1) | PHP_INI_ALL |
docref_root | " | (available since PHP 4.3) | PHP_INI_ALL |
docref_ext | " | (available since PHP 4.3.2) | PHP_INI_ALL |
error_prepend_string | NULL | Specifies a string to output before an error message | PHP_INI_ALL |
error_append_string | NULL | Specifies a string to output after an error message | PHP_INI_ALL |
error_log | NULL | Specifies the name of the file where script errors should be logged. The file should be writable by the web server's user. If the special value syslog is used, the errors are sent to the system logger instead | PHP_INI_ALL |
Function | Description |
---|---|
debug_backtrace() | Generates a backtrace |
debug_print_backtrace() | Prints a backtrace |
error_clear_last() | Clears the last error |
error_get_last() | Returns the last error that occurred |
error_log() | Sends an error message to a log, to a file, or to a mail account |
error_reporting() | Specifies which errors are reported |
restore_error_handler() | Restores the previous error handler |
restore_exception_handler() | Restores the previous exception handler |
set_error_handler() | Sets a user-defined error handler function |
set_exception_handler() | Sets a user-defined exception handler function |
trigger_error() | Creates a user-level error message |
user_error() | Alias of trigger_error() |
Value | Constant | Description |
---|---|---|
1 | E_ERROR | Fatal run-time errors. Errors that cannot be recovered from. Execution of the script is halted |
2 | E_WARNING | Run-time warnings (non-fatal errors). Execution of the script is not halted |
4 | E_PARSE | Compile-time parse errors. Parse errors should only be generated by the parser |
8 | E_NOTICE | Run-time notices. The script found something that might be an error, but could also happen when running a script normally |
16 | E_CORE_ERROR | Fatal errors at PHP startup. This is like E_ERROR, except it is generated by the core of PHP |
32 | E_CORE_WARNING | Non-fatal errors at PHP startup. This is like E_WARNING, except it is generated by the core of PHP |
64 | E_COMPILE_ERROR | Fatal compile-time errors. This is like E_ERROR, except it is generated by the Zend Scripting Engine |
128 | E_COMPILE_WARNING | Non-fatal compile-time errors. This is like E_WARNING, except it is generated by the Zend Scripting Engine |
256 | E_USER_ERROR | Fatal user-generated error. This is like E_ERROR, except it is generated in PHP code by using the PHP function trigger_error() |
512 | E_USER_WARNING | Non-fatal user-generated warning. This is like E_WARNING, except it is generated in PHP code by using the PHP function trigger_error() |
1024 | E_USER_NOTICE | User-generated notice. This is like E_NOTICE, except it is generated in PHP code by using the PHP function trigger_error() |
2048 | E_STRICT | Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code (Since PHP 5 but not included in E_ALL until PHP 5.4) |
4096 | E_RECOVERABLE_ERROR | Catchable fatal error. Indicates that a probably dangerous error occurred, but did not leave the Engine in an unstable state. If the error is not caught by a user defined handle, the application aborts as it was an E_ERROR (Since PHP 5.2) |
8192 | E_DEPRECATED | Run-time notices. Enable this to receive warnings about code that will not work in future versions (Since PHP 5.3) |
16384 | E_USER_DEPRECATED | User-generated warning message. This is like E_DEPRECATED, except it is generated in PHP code by using the PHP function trigger_error() (Since PHP 5.3) |
32767 | E_ALL | Enable all PHP errors and warnings (except E_STRICT in versions < 5.4) |
Name | Type | Description |
---|---|---|
function | string | The current function name |
line | integer | The current line number |
file | string | The current file name |
class | string | The current class name |
object | object | The current object |
type | string | The current call type. Possible calls:
|
args | array | If inside a function, it lists the functions arguments. If inside an included file, it lists the included file names |
Parameter | Description |
---|---|
options | Optional. Specifies a bitmask for the following options:DEBUG_BACKTRACE_PROVIDE_OBJECT (Whether or not to populate the "object" indexDEBUG_BACKTRACE_IGNORE_ARGS (Whether or not to omit the "args" index, and all the function/method arguments, to save memory) |
limit | Optional. Limits the number of stack frames printed. By default (limit=0) it prints all stack frames |
Return Value: | An array of associative arrays |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.4: The optional parameter limit was addedPHP 5.3.6: The parameter provide_object was changed to options and additional option DEBUG_BACKTRACE_IGNORE_ARGS is addedPHP 5.2.5: The optional parameter provide_object was addedPHP 5.1.1: Added the current object as a possible return element |
Parameter | Description |
---|---|
options | Optional. Specifies a bitmask for the following option: DEBUG_BACKTRACE_IGNORE_ARGS (Whether or not to omit the "args" index, and all the function/method arguments, to save memory) |
limit | Optional. Limits the number of stack frames printed. By default (limit=0) it prints all stack frames |
Return Value: | None |
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | PHP 5.4: The optional parameter limit was addedPHP 5.3.6: The optional parameter options was added |
Return Value: | Returns an associative array describing the last error with keys: type, message, file, and line. Returns NULL if no error has occurred yet |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
message | Required. Specifies the error message to log |
type | Optional. Specifies where the error message should go.
Possible values:
|
destination | Optional. Specifies the destination of the error message. This value depends on the value of the type parameter |
headers | Optional. Only used if the type parameter is set to 1. Specifies additional headers, like From, Cc, and Bcc. Multiple headers should be separated with a CRLF (\r\n) |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | No |
PHP Changelog: | PHP 5.2.7: The value of 4 was added to the type parameter |
Parameter | Description |
---|---|
level | Optional. Specifies the error-report level for the current script. Error numbers and named constants are accepted. Note: Named constants are recommended to ensure compatibility for future PHP versions |
Return Value: | Returns the old error reporting level or the current error reporting level if no level parameter is given |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.4: E_STRICT is now a part of E_ALL.PHP 5.3: New: E_DEPRECATED and E_USER_DEPRECATED.PHP 5.2: New: E_RECOVERABLE_ERROR.PHP 5.0: New: E_STRICT. |
Return Value: | Always TRUE |
---|---|
PHP Version: | 4.0.1+ |
Return Value: | Always TRUE |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
errorhandler | Required. Specifies the name of the function to be run at errors |
E_ALL|E_STRICT | Optional. Specifies on which error report level the user-defined error will be shown. Default is "E_ALL" |
Return Value: | A string that contains the previously defined error handler |
---|---|
PHP Version: | 4.0.1+ |
PHP Changelog: | PHP 5.5: The parameter errorhandler now accepts NULLPHP 5.2: The error handler must return FALSE to populate $php_errormsg |
Parameter | Description |
---|---|
exceptionhandler | Required. Specifies the name of the function to be run when an uncaught exception occurs. NULL can be passed instead, to reset this handler to its default state |
Return Value: | A string that contains the previously defined exception handler, or NULL on error or if no previous handler was defined |
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | Previously, if NULL was passed then this function returned TRUE. It returns the previous handler since PHP 5.5 |
Parameter | Description |
---|---|
message | Required. Specifies the error message for this error. Max 1024 bytes in length |
type | Optional. Specifies the error type for this error. Possible values:
|
Return Value: | FALSE if wrong error type is specified, TRUE otherwise |
---|---|
PHP Version: | 4.0.1+ |
Name | Default | Description | Changeable |
---|---|---|---|
allow_url_fopen | "1" | Allows fopen()-type functions to work with URLs | PHP_INI_SYSTEM |
allow_url_include | "0" | (available since PHP 5.2) | PHP_INI_SYSTEM |
user_agent | NULL | Defines the user agent for PHP to send (available since PHP 4.3) | PHP_INI_ALL |
default_socket_timeout | "60" | Sets the default timeout, in seconds, for socket based streams (available since PHP 4.3) | PHP_INI_ALL |
from | " | Defines the email address to be used on unauthenticated FTP connections and in the From header for HTTP connections when using ftp and http wrappers | PHP_INI_ALL |
auto_detect_line_endings | "0" | When set to "1", PHP will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Mac line-ending characters (available since PHP 4.3) | PHP_INI_ALL |
sys_temp_dir | " | (available since PHP 5.5) | PHP_INI_SYSTEM |
Function | Description |
---|---|
basename() | Returns the filename component of a path |
chgrp() | Changes the file group |
chmod() | Changes the file mode |
chown() | Changes the file owner |
clearstatcache() | Clears the file status cache |
copy() | Copies a file |
delete() | See unlink() |
dirname() | Returns the directory name component of a path |
disk_free_space() | Returns the free space of a filesystem or disk |
disk_total_space() | Returns the total size of a filesystem or disk |
diskfreespace() | Alias of disk_free_space() |
fclose() | Closes an open file |
feof() | Checks if the "end-of-file" (EOF) has been reached for an open file |
fflush() | Flushes buffered output to an open file |
fgetc() | Returns a single character from an open file |
fgetcsv() | Returns a line from an open CSV file |
fgets() | Returns a line from an open file |
fgetss() | Deprecated from PHP 7.3. Returns a line from an open file - stripped from HTML and PHP tags |
file() | Reads a file into an array |
file_exists() | Checks whether or not a file or directory exists |
file_get_contents() | Reads a file into a string |
file_put_contents() | Writes data to a file |
fileatime() | Returns the last access time of a file |
filectime() | Returns the last change time of a file |
filegroup() | Returns the group ID of a file |
fileinode() | Returns the inode number of a file |
filemtime() | Returns the last modification time of a file |
fileowner() | Returns the user ID (owner) of a file |
fileperms() | Returns the file's permissions |
filesize() | Returns the file size |
filetype() | Returns the file type |
flock() | Locks or releases a file |
fnmatch() | Matches a filename or string against a specified pattern |
fopen() | Opens a file or URL |
fpassthru() | Reads from the current position in a file - until EOF, and writes the result to the output buffer |
fputcsv() | Formats a line as CSV and writes it to an open file |
fputs() | Alias of fwrite() |
fread() | Reads from an open file (binary-safe) |
fscanf() | Parses input from an open file according to a specified format |
fseek() | Seeks in an open file |
fstat() | Returns information about an open file |
ftell() | Returns the current position in an open file |
ftruncate() | Truncates an open file to a specified length |
fwrite() | Writes to an open file (binary-safe) |
glob() | Returns an array of filenames / directories matching a specified pattern |
is_dir() | Checks whether a file is a directory |
is_executable() | Checks whether a file is executable |
is_file() | Checks whether a file is a regular file |
is_link() | Checks whether a file is a link |
is_readable() | Checks whether a file is readable |
is_uploaded_file() | Checks whether a file was uploaded via HTTP POST |
is_writable() | Checks whether a file is writable |
is_writeable() | Alias of is_writable() |
lchgrp() | Changes the group ownership of a symbolic link |
lchown() | Changes the user ownership of a symbolic link |
link() | Creates a hard link |
linkinfo() | Returns information about a hard link |
lstat() | Returns information about a file or symbolic link |
mkdir() | Creates a directory |
move_uploaded_file() | Moves an uploaded file to a new location |
parse_ini_file() | Parses a configuration file |
parse_ini_string() | Parses a configuration string |
pathinfo() | Returns information about a file path |
pclose() | Closes a pipe opened by popen() |
popen() | Opens a pipe |
readfile() | Reads a file and writes it to the output buffer |
readlink() | Returns the target of a symbolic link |
realpath() | Returns the absolute pathname |
realpath_cache_get() | Returns realpath cache entries |
realpath_cache_size() | Returns realpath cache size |
rename() | Renames a file or directory |
rewind() | Rewinds a file pointer |
rmdir() | Removes an empty directory |
set_file_buffer() | Alias of stream_set_write_buffer(). Sets the buffer size for write operations on the given file |
stat() | Returns information about a file |
symlink() | Creates a symbolic link |
tempnam() | Creates a unique temporary file |
tmpfile() | Creates a unique temporary file |
touch() | Sets access and modification time of a file |
umask() | Changes file permissions for files |
unlink() | Deletes a file |
Parameter | Description |
---|---|
path | Required. Specifies a file path |
suffix | Optional. A file extension. If the filename has this file extension, the file extension will be cut off |
Return Value: | The filename of the specified path |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to change user group for |
group | Required. Specifies the new group name or number |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file |
mode | Required. Specifies the new permissions.The mode parameter consists of four numbers:
|
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to change owner for |
owner | Required. Specifies the new owner. Can be a user name or a user ID. |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
clear_realpath_cache | Optional. Indicates whether to clear the realpath cache or not. Default is FALSE, which indicates not to clear realpath cache |
filename | Optional. Specifies a filename, and clears the realpath and cache for that file only |
Return Value: | Nothing |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3 - Added two optional parameters: clear_realpath_cahe and filename |
Parameter | Description |
---|---|
from_file | Required. Specifies the path to the file to copy from |
to_file | Required. Specifies the path to the file to copy to |
context | Optional. Specifies a context resource created with stream_context_create() |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3 - Added context parameter |
Parameter | Description |
---|---|
path | Required. Specifies a path to check |
levels | Optional. An integer that specifies the number of parent directories to go up. Default is 1 |
Return Value: | The path of the parent directory on success |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes, in PHP 5.0 |
PHP Changelog: | PHP 7.0 - Added the levels parameter |
Parameter | Description |
---|---|
directory | Required. Specifies the filesystem or disk to check |
Return Value: | The number of free space (in bytes) on success, FALSE on failure |
---|---|
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
directory | Required. Specifies the filesystem or disk to check |
Return Value: | The number of total size (in bytes) on success, FALSE on failure |
---|---|
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
file | Required. Specifies the file to close |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies an open file to check |
Return Value: | TRUE if EOF is reached or an error occurs, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to write the buffered output to |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to return a single character from |
Return Value: | A single character read from the file on success, FALSE on EOF |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes |
Parameter | Description |
---|---|
file | Required. Specifies the open file to return and parse a line from |
length | Optional. Specifies the maximum length of a line. Must be greater than the longest line (in characters) in the CSV file. Omitting this parameter (or setting it to 0) the line length is not limited, which is slightly slower. Note: This parameter is required in versions prior to PHP 5 |
separator | Optional. Specifies the field separator. Default is comma ( , ) |
enclosure | Optional. Specifies the field enclosure character. Default is " |
escape | Optional. Specifies the escape character. Default is "\\" |
Return Value: | An array with the CSV fields on success, NULL if an invalid file is supplied, FALSE on other errors and on EOF |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes, in PHP 4.3.5 |
PHP Changelog: | PHP 5.3 - Added the escape parameter |
Parameter | Description |
---|---|
file | Required. Specifies the open file to return a line from |
length | Optional. Specifies the number of bytes to read. Reading stops when length-1 bytes have been reached, or when a new line occurs, or on EOF. If no length is specified, it reads until end of the line |
Return Value: | A single line read from the file on success, FALSE on EOF or error |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes, in PHP 4.3 |
Parameter | Description |
---|---|
file | Required. Specifies the open file to return a line from |
length | Optional. Specifies the number of bytes to read. Reading stops when length-1 bytes have been reached, or a when a new line occurs, or on EOF. Note: This parameter is required in versions prior to PHP 5 |
tags | Optional. Specifies which tags that will not be removed |
Return Value: | A single line read from the file on success, FALSE on EOF or error |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to read |
flag |
Optional. Can be one or more of the following constants:
|
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream. Can be skipped by using NULL. |
Return Value: | The entire file in an array, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes, in PHP 4.3 |
Parameter | Description |
---|---|
path | Required. Specifies the path to the file or directory to check |
Return Value: | TRUE if the file or directory exists, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
path | Required. Specifies the path to the file to read |
include_path | Optional. Set this parameter to '1' if you want to search for the file in the include_path (in php.ini) as well |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream. Can be skipped by using NULL. |
start | Optional. Specifies where in the file to start reading. Negative values count from the end of the file |
max_length | Optional. Specifies the maximum length of data read. Default is read to EOF |
Return Value: | The entire file in a string, FALSE on failure |
---|---|
PHP Version: | 4.3+ |
Binary Safe: | Yes, in PHP 4.3 |
PHP Changelog: | PHP 7.1 - Support for negative values in start parameterPHP 5.1 - Added the start and max_length parameters |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to write to. If the file does not exist, this function will create one |
data | Required. The data to write to the file. Can be a string, array, or a data stream |
mode | Optional. Specifies how to open/write to the file. Possible values:
|
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream. |
Return Value: | The number of bytes written into the file on success, FALSE on failure |
---|---|
PHP Version: | 5.0+ |
Binary Safe: | Yes |
PHP Changelog: | PHP 5.1 - Added support for LOCK_EX and the ability to pass a stream resource to the data parameter |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The last access time as a Unix timestamp on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The last change time as a Unix timestamp on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The group ID for the file on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The inode number of the file on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The last time the file content was modified as a Unix timestamp, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The user ID of the owner of the file on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The file's permissions as a number, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to check |
Return Value: | The file size in bytes on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the file to check |
Return Value: | One of the file types on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies an open file to lock or release |
lock | Required. Specifies what kind of lock to use.Possible values:
|
block | Optional. Set to 1 to block other processes while locking |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.5: Added support for the block parameter on WindowsPHP 5.3: Removed automatic unlocking on fclose(). Unlocking must now be done manually |
Parameter | Description |
---|---|
pattern | Required. Specifies the shell wildcard pattern |
string | Required. Specifies the string or file to check |
flags | Optional. Can be one or a combination of the following:
|
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.3: Now available on Windows platforms |
Parameter | Description |
---|---|
filename | Required. Specifies the file or URL to open |
mode | Required. Specifies the type of access you require to the file/stream.Possible values:
|
include_path | Optional. Set this parameter to '1' if you want to search for the file in the include_path (in php.ini) as well |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | TRUE on success, FALSE and an error on failure. You can hide the error by adding an "@" in front of the function name. |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 7.1: Added "e" optionPHP 5.2: Added "c" and "c+" options |
Parameter | Description |
---|---|
file | Required. Specifies the open file to read from |
Return Value: | The number of characters read from the file and passed through the output or FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to write to |
fields | Required. Specifies which array to get the data from |
separator | Optional. A character that specifies the field separator. Default is comma ( , ) |
enclosure | Optional. A character that specifies the field enclosure character. Default is " |
escape | Optional. Specifies the escape character. Default is "\\". Can also be an empty string (") which disables the escape mechanism |
Return Value: | The length of the written string on success, FALSE on failure |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 7.4 - The escape parameter now accepts an empty string to disable the escape mechanism PHP 5.5 - Added the escape parameter |
Parameter | Description |
---|---|
file | Required. Specifies the open file to read from |
length | Required. Specifies the maximum number of bytes to read |
Return Value: | The read string, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes |
Parameter | Description |
---|---|
file | Required. Specifies the file to check |
format | Required. Specifies the format.Possible format values:
|
mixed | Optional. |
Return Value: | The read string, FALSE on failure |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to seek in |
offset | Required. Specifies the new position (measured in bytes from the beginning of the file) |
whence | Optional. Possible values:
|
Return Value: | 0 on success, otherwise -1 |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |
Return Value: | An array with information about the open file:
|
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to check |
Return Value: | The file pointer position, or FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to truncate |
size | Required. Specifies the new file size |
Return Value: | TRUE on success, or FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the open file to write to |
string | Required. Specifies the string to write to the open file |
length | Optional. Specifies the maximum number of bytes to write |
Return Value: | The number of bytes written, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Binary Safe: | Yes |
Parameter | Description |
---|---|
pattern | Required. Specifies the pattern to search for |
flags | Optional. Specifies special settings.Possible values:
|
Return Value: | An array of files/directories that matches the pattern, FALSE on failure |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.1: GLOB_ERR value added to the flags parameter |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the directory exists, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is executable, FALSE and an E_WARNING on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is a regular file, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is a symbolic link, FALSE and an E_WARNING otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is readable, FALSE and an E_WARNING otherwise |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is uploaded via HTTP POST, FALSE on failure |
---|---|
PHP Version: | 4.0.3+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the file to check |
Return Value: | TRUE if the file is writable, an E_WARNING on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the symlink |
group | Required. Specifies the new group by name or number |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the symlink |
group | Required. Specifies the new user by name or number |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
target | Required. Specifies the target |
link | Required. Specifies the name of the link |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3.0: Now available on Windows platforms |
Parameter | Description |
---|---|
path | Required. Specifies the path to check |
Return Value: | The device ID returned by lstat system call on success, FALSE or 0 on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3.0: Now available on Windows platforms |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file or a symbolic link to check |
Return Value: |
An array with the following elements:
|
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
path | Required. Specifies the directory path to create |
mode | Optional. Specifies permissions. By default, the mode is 0777 (widest possible access).Note:
The mode parameters is ignored on Windows platforms!
The mode parameter consists of four numbers:
|
recursive | Optional. Specifies if the recursive mode is set (added in PHP 5) |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream (added in PHP 5) |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the filename of the uploaded file |
dest | Required. Specifies the new location for the file |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0.3+ |
Parameter | Description |
---|---|
file | Required. Specifies the ini file to parse |
process_sections | Optional. If set to TRUE, it returns is a multidimensional array with section names and settings included. Default is FALSE |
scanner_mode |
Optional. Can be one of the following values:
|
Return Value: | An array on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.0: Hash marks (#) is no longer recognized as commentsPHP 5.6.1: Added INI_SCANNER_TYPED modePHP 5.3: Added optional scanner_mode parameter |
Parameter | Description |
---|---|
ini | Required. Specifies the ini file to parse |
process_sections | Optional. If set to TRUE, it returns is a multidimensional array with section names and settings included. Default is FALSE |
scanner_mode |
Optional. Can be one of the following values:
|
Return Value: | An array on success, FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
path | Required. Specifies the path to be checked |
options | Optional. Specifies which array element to return. If not specified, it
returns all elements.Possible values:
|
Return Value: | If the option parameter is omitted, it returns an associative array with dirname, basename, extension, and filename. If the option parameter is specified, it returns a string with the requested element. FALSE on failure |
---|---|
PHP Version: | 4.0.3+ |
PHP Changelog: | PHP 5.2: PATHINFO_FILENAME was added |
Parameter | Description |
---|---|
pipe | Required. Specifies the pipe opened by popen() |
Return Value: | The termination status, -1 on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
command | Required. Specifies the command to execute |
mode | Required. Specifies the connection mode. Can be "r" (Read only) or "w" (Write only - opens and clears existing file or creates a new file) |
Return Value: | FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies the file to read |
include_path | Optional. Set this parameter to TRUE if you want to search for the file in the include_path (in php.ini) as well |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | The number of bytes read on success, FALSE and an error on failure. You can hide the error message by adding an '@' in front of the function name |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.0: Added context support |
Parameter | Description |
---|---|
linkpath | Required. Specifies the link path to check |
Return Value: | The target of the link on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: readlink() now available on Windows platforms |
Parameter | Description |
---|---|
path | Required. Specifies the path to check |
Return Value: | The absolute pathname on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3:PHP 5.2.1: |
Return Value: | An array of realpath cache entries |
---|---|
PHP Version: | 5.3.2+ |
Return Value: | How much memory realpath cache is using |
---|---|
PHP Version: | 5.3.2+ |
Parameter | Description |
---|---|
old | Required. Specifies the file or directory to be renamed |
new | Required. Specifies the new name for the file or directory |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3.1: Allow renaming files across drives in Windows.PHP 5.0: Can be used with some URL wrappers. |
Parameter | Description |
---|---|
file | Required. Specifies the open file |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
dir | Required. Specifies the path to the directory to be removed |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
file | Required. Specifies a file pointer |
buffer | Required. Specifies the number of bytes to buffer |
Return Value: | 0 on success, another value if request failed |
---|---|
PHP Version: | 4.3+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file |
Return Value: |
An array with the following elements:
|
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
target | Required. Specifies the target of the link |
link | Required. Specifies the link name |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: Available on Windows platforms |
Parameter | Description |
---|---|
dir | Required. Specifies the directory of where to create the temp file |
prefix | Required. Specifies the start of the filename |
Return Value: | The new temporary filename, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: |
Return Value: | A file handle (similar to the one returned by fopen() for the new file), FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the file to touch |
time | Optional. Sets the touch time. The current system time is set by default |
atime | Optional. Sets the access time. Default is the current system time if no parameters are set, or the same as the time parameter if that parameter is set |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3 - |
Parameter | Description |
---|---|
mask | Optional. Specifies the new permissions. Default is 0777
The mask parameter consists of four numbers:
|
Return Value: | If you call umask() without any arguments, it returns the current umask, otherwise it returns the old umask |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
filename | Required. Specifies the path to the file to delete |
context | Optional. Specifies the context of the file handle. Context is a set of options that can modify the behavior of a stream |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.0 - Added the context parameter |
Name | Description | Default | Changeable |
---|---|---|---|
filter.default | Filter all $_GET, $_POST, $_COOKIE, $_REQUEST and $_SERVER data by this filter. Accepts the name of the filter you like to use by default. See the filter list for the list of the filter names | "unsafe_raw" | PHP_INI_PERDIR |
filter.default_flags | Default flags to apply when the default filter is set. This is set to FILTER_FLAG_NO_ENCODE_QUOTES by default for backwards compatibility reasons | NULL | PHP_INI_PERDIR |
Function | Description |
---|---|
filter_has_var() | Checks whether a variable of a specified input type exist |
filter_id() | Returns the filter ID of a specified filter name |
filter_input() | Gets an external variable (e.g. from form input) and optionally filters it |
filter_input_array() | Gets external variables (e.g. from form input) and optionally filters them |
filter_list() | Returns a list of all supported filter names |
filter_var() | Filters a variable with a specified filter |
filter_var_array() | Gets multiple variables and filter them |
Constant | Description |
---|---|
INPUT_POST | POST variables |
INPUT_GET | GET variables |
INPUT_COOKIE | COOKIE variables |
INPUT_ENV | ENV variables |
INPUT_SERVER | SERVER variables |
FILTER_DEFAULT | Do nothing, optionally strip/encode special characters. Equivalent to FILTER_UNSAFE_RAW |
FILTER_FLAG_NONE | Allows no flags |
FILTER_FLAG_ALLOW_OCTAL | Only for inputs that starts with a zero (0) as octal numbers. This only allows the succeeding digits to be 0-7 |
FILTER_FLAG_ALLOW_HEX | Only for inputs that starts with 0x/0X as hexadecimal numbers. This only allows succeeding characters to be a-fA-F0-9 |
FILTER_FLAG_STRIP_LOW | Strip characters with ASCII value lower than 32 |
FILTER_FLAG_STRIP_HIGH | Strip characters with ASCII value greater than 127 |
FILTER_FLAG_ENCODE_LOW | Encode characters with ASCII value lower than 32 |
FILTER_FLAG_ENCODE_HIGH | Encode characters with ASCII value greater than 127 |
FILTER_FLAG_ENCODE_AMP | Encode & |
FILTER_FLAG_NO_ENCODE_QUOTES | Do not encode ' and " |
FILTER_FLAG_EMPTY_STRING_NULL | Not in use |
FILTER_FLAG_ALLOW_FRACTION | Allows a period (.) as a fractional separator in numbers |
FILTER_FLAG_ALLOW_THOUSAND | Allows a comma (,) as a thousands separator in numbers |
FILTER_FLAG_ALLOW_SCIENTIFIC | Allows an e or E for scientific notation in numbers |
FILTER_FLAG_PATH_REQUIRED | The URL must contain a path part |
FILTER_FLAG_QUERY_REQUIRED | The URL must contain a query string |
FILTER_FLAG_IPV4 | Allows the IP address to be in IPv4 format |
FILTER_FLAG_IPV6 | Allows the IP address to be in IPv6 format |
FILTER_FLAG_NO_RES_RANGE | Fails validation for the reserved IPv4 ranges: 0.0.0.0/8, 169.254.0.0/16, 127.0.0.0/8 and 240.0.0.0/4, and for the reserved IPv6 ranges: ::1/128, ::/128, ::ffff:0:0/96 and fe80::/10 |
FILTER_FLAG_NO_PRIV_RANGE | Fails validation for the private IPv4 ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, and for the IPv6 addresses starting with FD or FC |
FILTER_FLAG_EMAIL_UNICODE | Allows the local part of the email address to contain Unicode characters |
FILTER_REQUIRE_SCALAR | The value must be a scalar |
FILTER_REQUIRE_ARRAY | The value must be an array |
FILTER_FORCE_ARRAY | Treats a scalar value as array with the scalar value as only element |
FILTER_NULL_ON_FAILURE | Return NULL on failure for unrecognized boolean values |
FILTER_VALIDATE_BOOLEAN | Validates a boolean |
FILTER_VALIDATE_EMAIL | Validates value as a valid e-mail address |
FILTER_VALIDATE_FLOAT | Validates value as float |
FILTER_VALIDATE_INT | Validates value as integer |
FILTER_VALIDATE_IP | Validates value as IP address |
FILTER_VALIDATE_MAC | Validates value as MAC address |
FILTER_VALIDATE_REGEXP | Validates value against a regular expression |
FILTER_VALIDATE_URL | Validates value as URL |
FILTER_SANITIZE_EMAIL | Removes all illegal characters from an e-mail address |
FILTER_SANITIZE_ENCODED | Removes/Encodes special characters |
FILTER_SANITIZE_MAGIC_QUOTES | Apply addslashes() |
FILTER_SANITIZE_NUMBER_FLOAT | Remove all characters, except digits, +- signs, and optionally .,eE |
FILTER_SANITIZE_NUMBER_INT | Removes all characters except digits and + - signs |
FILTER_SANITIZE_SPECIAL_CHARS | Removes special characters |
FILTER_SANITIZE_STRING | Removes tags/special characters from a string |
FILTER_SANITIZE_STRIPPED | Alias of FILTER_SANITIZE_STRING |
FILTER_SANITIZE_URL | Removes all illegal character from s URL |
FILTER_UNSAFE_RAW | Do nothing, optionally strip/encode special characters |
FILTER_CALLBACK | Call a user-defined function to filter data |
Parameter | Description |
---|---|
type | Required. The input type to check for. Can be one of the following:
|
variable | Required. The variable name to check |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
filter_name | Required. The filter name to get the id from. Tip: Use filter_list() to list all available filters |
Return Value: | The filter ID on success, FALSE if filter does not exist |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
type | Required. The input type to check for. Can be one of the following:
|
variable | Required. The variable name to check |
filter | Optional. Specifies the ID or name of the filter to use. Default is FILTER_DEFAULT, which results in no filtering |
options | Optional. Specifies one or more flags/options to use. Check each filter for possible options and flags |
Return Value: | The value of the variable on success, FALSE on failure, or NULL if the variable is not set |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
type | Required. The input type to check for. Can be one of the following:
|
definition | Optional. Specifies an array of filter arguments. A valid array key is a variable name, and a valid value is a filter name or ID, or an array specifying the filter, flags and options. This parameter can also be a single filter name/ID; then all values in the input array are filtered by the specified filter |
add_empty | Optional. A Boolean value. TRUE adds missing keys as NULL to the return value. Default value is TRUE |
Return Value: | An array with the values of the variables on success, FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.4 - The add_empty parameter was added |
Return Value: | An array of all supported filter names, an empty array if there are no filter names |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
var | Required. The variable to filter |
filtername | Optional. Specifies the ID or name of the filter to use. Default is FILTER_DEFAULT, which results in no filtering |
options | Optional. Specifies one or more flags/options to use. Check each filter for possible options and flags |
Return Value: | Returns the filtered data on success, FALSE on failure |
---|---|
PHP Version: | 5.2+ |
Parameter | Description |
---|---|
data_array | Required. Specifies an array with string keys containing the data to filter |
args | Optional. Specifies an array of filter arguments. A valid array key is a variable name and a valid value is a filter ID, or an array specifying the filter, flags and option. This parameter can also be a single filter ID, if so, all values in the input array are filtered by the specified filter. A filter ID can be an ID name (like FILTER_VALIDATE_EMAIL) or an ID number (like 274) |
add_empty | Optional. A Boolean value. TRUE adds missing keys as NULL to the return value. Default value is TRUE |
Return Value: | An array of values of the requested variables on success, FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 5.4 - The add_empty parameter was added |
Function | Description |
---|---|
ftp_alloc() | Allocates space for a file to be uploaded to the FTP server |
ftp_cdup() | Changes to the parent directory on the FTP server |
ftp_chdir() | Changes the current directory on the FTP server |
ftp_chmod() | Sets permissions on a file via FTP |
ftp_close() | Closes an FTP connection |
ftp_connect() | Opens an FTP connection |
ftp_delete() | Deletes a file on the FTP server |
ftp_exec() | Executes a command on the FTP server |
ftp_fget() | Downloads a file from the FTP server and saves it into an open local file |
ftp_fput() | Uploads from an open file and saves it to a file on the FTP server |
ftp_get() | Downloads a file from the FTP server |
ftp_get_option() | Returns runtime options of the FTP connection |
ftp_login() | Logs in to the FTP connection |
ftp_mdtm() | Returns the last modified time of a specified file |
ftp_mkdir() | Creates a new directory on the FTP server |
ftp_mlsd() | Returns the list of files in the specified directory |
ftp_nb_continue() | Continues retrieving/sending a file (non-blocking) |
ftp_nb_fget() | Downloads a file from the FTP server and saves it into an open file (non-blocking) |
ftp_nb_fput() | Uploads from an open file and saves it to a file on the FTP server (non-blocking) |
ftp_nb_get() | Downloads a file from the FTP server (non-blocking) |
ftp_nb_put() | Uploads a file to the FTP server (non-blocking) |
ftp_nlist() | Returns a list of files in the specified directory on the FTP server |
ftp_pasv() | Turns passive mode on or off |
ftp_put() | Uploads a file to the FTP server |
ftp_pwd() | Returns the current directory name |
ftp_quit() | Alias of ftp_close() |
ftp_raw() | Sends a raw command to the FTP server |
ftp_rawlist() | Returns a list of files with file information from a specified directory |
ftp_rename() | Renames a file or directory on the FTP server |
ftp_rmdir() | Deletes an empty directory on the FTP server |
ftp_set_option() | Sets runtime options for the FTP connection |
ftp_site() | Sends an FTP SITE command to the FTP server |
ftp_size() | Returns the size of the specified file |
ftp_ssl_connect() | Opens a secure SSL-FTP connection |
ftp_systype() | Returns the system type identifier of the FTP server |
Constant | Type | Description |
---|---|---|
FTP_ASCII | Integer | |
FTP_AUTOSEEK | Integer | |
FTP_AUTORESUME | Integer | |
FTP_BINARY | Integer | |
FTP_FAILED | Integer | Asynchronous transfer has failed |
FTP_FINISHED | Integer | Asynchronous transfer is completed |
FTP_IMAGE | Integer | Alias of FTP_BINARY |
FTP_MOREDATA | Integer | Asynchronous transfer is in progress |
FTP_TEXT | Integer | Alias of FTP_ASCII |
FTP_TIMEOUT_SEC | Integer | The timeout used for network operations |
FTP_USEPASVADDRESS | Boolean |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
filesize | Required. Specifies the number of bytes to allocate |
result | Optional. Specifies a variable to store the server response in |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
directory | Required. Specifies the directory to change to |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
mode | Required. Specifies the new permissions.This parameter consists of four numbers:
|
file | Required. Specifies the file to set permissions on |
Return Value: | The new file permissions on success, FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to close |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
host | Required. Specifies the FTP server to connect to. Can be a domain address or an IP address. This parameter should not be prefixed with "ftp://" or have any trailing slashes |
port | Optional. Specifies the port of the FTP server. Default is port 21 |
timeout | Optional. Specifies the timeout for all subsequent network operations. Default is 90 seconds |
Return Value: | An FTP stream on success or FALSE on error |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The timeout parameter was added in PHP 4.2.0 |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
file | Required. Specifies the path of the file to delete |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Return Value: | TRUE if the command was executed successfully; FALSE otherwise |
---|---|
PHP Version: | 4.0.3+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
open_file | Required. Specifies an open local file in which we store the data |
server_file | Required. Specifies the server file to download |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start downloading from |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional.PHP 4.3 - The startpos parameter was added. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
remote_file | Required. Specifies the file path to upload to |
open_file | Required. Specifies an open local file. Reading stops at end of file |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start uploading to |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional.PHP 4.3 - The startpos parameter was added. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
local_file | Required. Specifies the local file path (will be overwritten if the file already exists) |
server_file | Required. Specifies the server file to download |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start downloading from |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional.PHP 4.3 - The startpos parameter was added. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
option | Required. Specifies the runtime option to return. Possible values:
|
Return Value: | Returns the value on success, or FALSE (and a warning message) if the given option is not supported |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
username | Required. Specifies the username to login with |
password | Required. Specifies the password to login with |
Return Value: | TRUE on success, FALSE and a warning on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to login to |
file | Required. Specifies the file to check |
Return Value: | The last modified time as a Unix timestamp on success, -1 on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
dir | Required. Specifies the name of the directory to create |
Return Value: | The name of the new directory on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
dir | Required. Specifies the name of the directory to be listed. Use "." to get the current directory |
Return Value: | An array with file info from the specified directory on success, FALSE on failure |
---|---|
PHP Version: | 7.2+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
open_file | Required. Specifies an open local file in which we store the data |
server_file | Required. Specifies the server file to download |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start downloading from |
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
remote_file | Required. Specifies the file path to upload to |
open_file | Required. Specifies a pointer to the open local file |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start uploading to |
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
local_file | Required. Specifies the local file path (will be overwritten if the file already exists) |
server_file | Required. Specifies the server file to download |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start downloading from |
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
remote_file | Required. Specifies the file path to upload to |
local_file | Required. Specifies the path of the local file to upload |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start uploading to |
Return Value: | One of the following values:
|
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
dir | Required. Specifies the directory to be listed. Use "." to get the current directory |
Return Value: | An array of file names from the specified directory on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
pasv | Required. Specifies the passive mode. Possible values:
|
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
remote_file | Required. Specifies the file path to upload to |
local_file | Required. Specifies the path of the file to upload |
mode | Optional. Specifies the transfer mode. Possible values: FTP_ASCII or FTP_BINARY |
startpos | Optional. Specifies the position in the remote file to start uploading to |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.3 - The mode parameter was made optional.PHP 4.3 - The startpos parameter was added. |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
Return Value: | The current directory name on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the command to execute |
Return Value: | The response from the server as an array of strings |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
dir | Required. Specifies the directory path. May include arguments for the LIST command. Tip: Use "." to specify the current directory |
recursive | Optional. By default, this function sends a "LIST" command to the server. However, if the recursive parameter is set to TRUE, it sends a "LIST -R" command |
Return Value: | An array where each element corresponds to one line of text (no parsing is performed). Returns FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | The recursive parameter was added in PHP 4.3 |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
oldname | Required. Specifies the file or directory to rename |
newname | Required. Specifies the new name of the file or directory |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
dir | Required. Specifies the empty directory to delete |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
option | Required. Specifies the runtime option to set. Possible values:
|
value | Required. Specifies the value of the option parameter |
Return Value: | TRUE if the option could be set, FALSE if not (a warning message is also thrown) |
---|---|
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
command | Required. Specifies the SITE command (this parameter is not escaped) |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
file | Required. Specifies the server file to check |
Return Value: | The size of the file (in bytes) on success, or -1 on error |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
host | Required. Specifies the FTP server address. Can be a domain address or an IP address. This parameter should not be prefixed with "ftp://" or have any trailing slashes |
port | Optional. Specifies the port to connect to. Default is 21 |
timeout | Optional. Specifies the timeout for network operations. Default is 90 seconds |
Return Value: | An SSL-FTP stream on success, FALSE on failure |
---|---|
PHP Version: | 4.3+ |
PHP Changelog: | PHP 5.2.2 - This function returns FALSE if it cannot use an SSL connection, instead of falling back to a non-SSL connection |
Parameter | Description |
---|---|
ftp_conn | Required. Specifies the FTP connection to use |
Return Value: | The system type on success, FALSE on failure |
---|---|
PHP Version: | 4+ |
Function | Description |
---|---|
json_decode() | Decodes a JSON string |
json_encode() | Encode a value to JSON format |
json_last_error() | Returns the last error occurred |
json_last_error_msg() | Returns the error string of the last json_encode() or json_decode() call |
Constant | Type | Description |
---|---|---|
JSON_ERROR_NONE | Integer | No error has occurred |
JSON_ERROR_DEPTH | Integer | Maximum stack depth has been exceeded |
JSON_ERROR_STATE_MISMATCH | Integer | Invalid/Malformed JSON |
JSON_ERROR_CTRL_CHAR | Integer | Control character error |
JSON_ERROR_SYNTAX | Integer | Syntax error |
JSON_ERROR_UTF8 | Integer | Malformed UTF-8 characters. PHP 5.3 |
JSON_ERROR_RECURSION | Integer | Invalid recursive reference values. PHP 5.5 |
JSON_ERROR_INF_OR_NAN | Integer | Invalid NAN or INF values. PHP 5.5 |
JSON_ERROR_UNSUPPORTED_TYPE | Integer | Invalid type. PHP 5.5 |
JSON_ERROR_INVALID_PROPERTY_NAME | Integer | Invalid property name. PHP 7.0 |
JSON_ERROR_UTF16 | Integer | Malformed UTF-16 characters. PHP 7.0 |
JSON_BIGINT_AS_STRING | Integer | |
JSON_OBJECT_AS_ARRAY | Integer | |
JSON_HEX_TAG | Integer | |
JSON_HEX_AMP | Integer | |
JSON_HEX_APOS | Integer | |
JSON_HEX_QUOT | Integer | |
JSON_FORCE_OBJECT | Integer | |
JSON_NUMERIC_CHECK | Integer | |
JSON_PRETTY_PRINT | Integer | |
JSON_UNESCAPED_SLASHES | Integer | |
JSON_PARTIAL_OUTPUT_ON_ERROR | Integer | |
JSON_PRESERVE_ZERO_FRACTION | Integer | |
JSON_UNESCAPED_LINE_TERMINATORS | Integer | |
JSON_INVALID_UTF8_IGNORE | Integer | |
JSON_INVALID_UTF8_SUBSTITUTE | Integer | |
JSON_THROWN_ON_ERROR | Integer |
Parameter | Description |
---|---|
string | Required. Specifies the value to be encoded |
assoc | Optional. Specifies a Boolean value. When set to true, the returned object will be converted into an associative array. When set to false, it returns an object. False is default |
depth | Optional. Specifies the recursion depth. Default recursion depth is 512 |
options | Optional. Specifies a bitmask (JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR) |
Return Value: | Returns the value encoded in JSON in appropriate PHP type. If the JSON object cannot be decoded it returns NULL |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 7.3: Added JSON_THROWN_ON_ERROR optionPHP 7.2: Added JSON_INVALID_UTF8_IGNORE, and JSON_INVALID_UTF8_SUBSTITUTE optionsPHP 5.4: Added JSON_BIGINT_AS_STRING, and JSON_OBJECT_AS_ARRAY optionsPHP 5.4: Added options parameterPHP 5.3: Added depth parameter |
Parameter | Description |
---|---|
value | Required. Specifies the value to be encoded |
options | Optional. Specifies a bitmask (JSON_FORCE_OBJECT, JSON_HEX_QUOT, JSON_HEX_TAG, JSON_HEX_AMP, JSON_HEX_APOS, JSON_INVALID_UTF8_IGNORE, JSON_INVALID_UTF8_SUBSTITUTE, JSON_NUMERIC_CHECK, JSON_PARTIAL_OUTPUT_ON_ERROR, JSON_PRESERVE_ZERO_FRACTION, JSON_PRETTY_PRINT, JSON_UNESCAPED_LINE_TERMINATORS, JSON_UNESCAPED_SLASHES, JSON_UNESCAPED_UNICODE, JSON_THROW_ON_ERROR) |
depth | Optional. Specifies the maximum depth |
Return Value: | Returns a JSON encoded string on success. FALSE on failure |
---|---|
PHP Version: | 5.2+ |
PHP Changelog: | PHP 7.3: Added JSON_THROWN_ON_ERROR optionPHP 7.2: Added JSON_INVALID_UTF8_IGNORE, and JSON_INVALID_UTF8_SUBSTITUTE optionsPHP 7.1: Added JSON_UNESCAPED_LINE_TERMINATORS optionPHP 5.6: Added JSON_PRESERVE_ZERO_FRACTION optionPHP 5.5: Added depth parameter PHP 5.5: Added JSON_PARTIAL_OUTPUT_ON_ERROR option PHP 5.5: Changed return value on failure from null to FALSE PHP 5.4: Added JSON_PRETTY_PRINT, JSON_UNESCAPED_SLASHES, and JSON_UNESCAPED_UNICODE optionsPHP 5.3: Added JSON_FORCE_OBJECT, JSON_HEX_AMP, JSON_HEX_APOS, JSON_HEX_QUOT, JSON_HEX_TAG, and JSON_NUMERIC_CHECK optionsPHP 5.3: Added options parameter |
Return Value: | Returns an integer, and the value can be one of the following constants:
|
---|---|
PHP Version: | 5.3+ |
Function | Description |
---|---|
libxml_clear_errors() | Clears the libxml error buffer |
libxml_disable_entity_loader() | Enables the ability to load external entities |
libxml_get_errors() | Gets the errors from the the libxml error buffer |
libxml_get_last_error() | Gets the last error from the the libxml error buffer |
libxml_set_external_entity_loader() | Changes the default external entity loader |
libxml_set_streams_context() | Sets the streams context for the next libxml document load or write |
libxml_use_internal_errors() | Disables the standard libxml errors and enables user error handling |
Constant | Description |
---|---|
LIBXML_BIGLINES | Make line numbers greater than 65535 to be reported correctly |
LIBXML_COMPACT | Set small nodes allocation optimization. This may improve the application performance |
LIBXML_DTDATTR | Set default DTD attributes |
LIBXML_DTDLOAD | Load external subset |
LIBXML_DTDVALID | Validate with the DTD |
LIBXML_HTML_NOIMPLIED | Set HTML_PARSE_NOIMPLIED flag. This turns off automatic adding of implied html/body elements |
LIBXML_HTML_NODEFDTD | Set HTML_PARSE_NODEFDTD flag. This prevents a default doctype to be added, if no doctype is found |
LIBXML_NOBLANKS | Remove blank nodes |
LIBXML_NOCDATA | Set CDATA as text nodes |
LIBXML_NOEMPTYTAG | Change empty tags (e.g. <br/> to <br></br>), only available in the DOMDocument->save() and DOMDocument->saveXML() functions |
LIBXML_NOENT | Substitute entities |
LIBXML_NOERROR | Do not show error reports |
LIBXML_NONET | Stop network access while loading documents |
LIBXML_NOWARNING | Do not show warning reports |
LIBXML_NOXMLDECL | Drop the XML declaration when saving a document |
LIBXML_NSCLEAN | Remove excess namespace declarations |
LIBXML_PARSEHUGE | Set XML_PARSE_HUGE flag. This relaxes any hardcoded limit from the parser, such as maximum depth of a document or the size of text nodes |
LIBXML_PEDANTIC | Set XML_PARSE_PEDANTIC flag. This enables pedantic error reporting |
LIBXML_XINCLUDE | Use XInclude substitution |
LIBXML_ERR_ERROR | Get recoverable errors |
LIBXML_ERR_FATAL | Get fatal errors |
LIBXML_ERR_NONE | Get no errors |
LIBXML_ERR_WARNING | Get simple warnings |
LIBXML_VERSION | Get libxml version (e.g. 20605 or 20617) |
LIBXML_DOTTED_VERSION | Get dotted libxml version (e.g. 2.6.5 or 2.6.17) |
LIBXML_SCHEMA_CREATE | Create default or fixed value nodes during XSD schema validation |
Return Value: | No value |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
bool | Optional. Disable (TRUE) or enable (FALSE) libxml extensions to load external entities. Default is TRUE |
Return Value: | Returns the previous value of the bool parameter |
---|---|
PHP Version: | 5.2.11+ |
Return Value: | Returns an array of error objects, or an empty array if there are no errors in the error buffer |
---|---|
PHP Version: | 5.1+ |
Return Value: | Returns an error object if there is any error in the buffer, FALSE otherwise |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
function | Required. A function that takes three arguments. Two strings, a public id and system id, and a context (an array with four keys) as the third argument. This callback should return a resource, a string from which a resource can be opened, or NULL. |
Return Value: | Returns TRUE on success, FALSE on failure |
---|---|
PHP Version: | 5.4+ |
Parameter | Description |
---|---|
function | Required. A function that takes three arguments. Two strings, a public id and system id, and a context (an array with four keys) as the third argument. This callback should return a resource, a string from which a resource can be opened, or NULL. |
Return Value: | Nothing |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
user_errors | Optional. Enable user error handling (TRUE) or disable user error handling (FALSE). Default is FALSE |
Return Value: | Returns the previous value of the user_errors parameter |
---|---|
PHP Version: | 5.1+ |
Name | Default | Description | Changeable |
---|---|---|---|
mail.add_x_header | "0" | Add X-PHP-Originating-Script that will include UID of the script followed by the filename. For PHP 5.3.0 and above | PHP_INI_PERDIR |
mail.log | NULL | The path to a log file that will log all mail() calls. Log include full path of script, line number, To address and headers. For PHP 5.3.0 and above | PHP_INI_PERDIR |
SMTP | "localhost" | Windows only: The DNS name or IP address of the SMTP server | PHP_INI_ALL |
smtp_port | "25" | Windows only: The SMTP port number. For PHP 4.3.0 and above | PHP_INI_ALL |
sendmail_from | NULL | Windows only: Specifies the "from" address to be used when sending mail from mail() | PHP_INI_ALL |
sendmail_path | "/usr/sbin/sendmail -t -i" | Specifies where the sendmail program can be found. This directive works also under Windows. If set, SMTP, smtp_port and sendmail_from are ignored | PHP_INI_SYSTEM |
Function | Description |
---|---|
ezmlm_hash() | Calculates the hash value needed by EZMLM |
mail() | Allows you to send emails directly from a script |
Parameter | Description |
---|---|
address | Required. Specifies the email address being hashed |
Return Value: | Returns the hash value of the address parameter, or FALSE on failure |
---|---|
PHP Version: | 4.0.2+ |
Parameter | Description |
---|---|
to | Required. Specifies the receiver / receivers of the email |
subject | Required. Specifies the subject of the email. Note: This parameter cannot contain any newline characters |
message | Required. Defines the message to be sent. Each line should be separated with a LF (\n). Lines should not exceed 70 characters. Windows note: If a full stop is found on the beginning of a line in the message, it might be removed. To solve this problem, replace the full stop with a double dot: <?php $txt = str_replace("\n.", "\n..", $txt); ?> |
headers | Optional. Specifies additional headers, like From, Cc, and Bcc. The additional headers should be separated with a CRLF (\r\n). Note: When sending an email, it must contain a From header. This can be set with this parameter or in the php.ini file. |
parameters | Optional. Specifies an additional parameter to the sendmail program (the one defined in the sendmail_path configuration setting). (i.e. this can be used to set the envelope sender address when using sendmail with the -f sendmail option) |
Return Value: | Returns the hash value of the address parameter, or FALSE on failure. Note: Keep in mind that even if the email was accepted for delivery, it does NOT mean the email is actually sent and received! |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 7.2: The headers parameter also accepts an arrayPHP 5.4: Added header injection protection for the headers parameter.PHP 4.3.0: (Windows only) All custom headers (like From, Cc, Bcc and Date) are supported, and are not case-sensitive.PHP 4.2.3: The parameter parameter is disabled in safe modePHP 4.0.5: The parameter parameter was added |
Function | Description |
---|---|
abs() | Returns the absolute (positive) value of a number |
acos() | Returns the arc cosine of a number |
acosh() | Returns the inverse hyperbolic cosine of a number |
asin() | Returns the arc sine of a number |
asinh() | Returns the inverse hyperbolic sine of a number |
atan() | Returns the arc tangent of a number in radians |
atan2() | Returns the arc tangent of two variables x and y |
atanh() | Returns the inverse hyperbolic tangent of a number |
base_convert() | Converts a number from one number base to another |
bindec() | Converts a binary number to a decimal number |
ceil() | Rounds a number up to the nearest integer |
cos() | Returns the cosine of a number |
cosh() | Returns the hyperbolic cosine of a number |
decbin() | Converts a decimal number to a binary number |
dechex() | Converts a decimal number to a hexadecimal number |
decoct() | Converts a decimal number to an octal number |
deg2rad() | Converts a degree value to a radian value |
exp() | Calculates the exponent of e |
expm1() | Returns exp(x) - 1 |
floor() | Rounds a number down to the nearest integer |
fmod() | Returns the remainder of x/y |
getrandmax() | Returns the largest possible value returned by rand() |
hexdec() | Converts a hexadecimal number to a decimal number |
hypot() | Calculates the hypotenuse of a right-angle triangle |
intdiv() | Performs integer division |
is_finite() | Checks whether a value is finite or not |
is_infinite() | Checks whether a value is infinite or not |
is_nan() | Checks whether a value is 'not-a-number' |
lcg_value() | Returns a pseudo random number in a range between 0 and 1 |
log() | Returns the natural logarithm of a number |
log10() | Returns the base-10 logarithm of a number |
log1p() | Returns log(1+number) |
max() | Returns the highest value in an array, or the highest value of several specified values |
min() | Returns the lowest value in an array, or the lowest value of several specified values |
mt_getrandmax() | Returns the largest possible value returned by mt_rand() |
mt_rand() | Generates a random integer using Mersenne Twister algorithm |
mt_srand() | Seeds the Mersenne Twister random number generator |
octdec() | Converts an octal number to a decimal number |
pi() | Returns the value of PI |
pow() | Returns x raised to the power of y |
rad2deg() | Converts a radian value to a degree value |
rand() | Generates a random integer |
round() | Rounds a floating-point number |
sin() | Returns the sine of a number |
sinh() | Returns the hyperbolic sine of a number |
sqrt() | Returns the square root of a number |
srand() | Seeds the random number generator |
tan() | Returns the tangent of a number |
tanh() | Returns the hyperbolic tangent of a number |
Constant | Value | Description |
---|---|---|
INF | INF | The infinite |
M_E | 2.7182818284590452354 | Returns e |
M_EULER | 0.57721566490153286061 | Returns Euler constant |
M_LNPI | 1.14472988584940017414 | Returns the natural logarithm of PI: log_e(pi) |
M_LN2 | 0.69314718055994530942 | Returns the natural logarithm of 2: log_e 2 |
M_LN10 | 2.30258509299404568402 | Returns the natural logarithm of 10: log_e 10 |
M_LOG2E | 1.4426950408889634074 | Returns the base-2 logarithm of E: log_2 e |
M_LOG10E | 0.43429448190325182765 | Returns the base-10 logarithm of E: log_10 e |
M_PI | 3.14159265358979323846 | Returns Pi |
M_PI_2 | 1.57079632679489661923 | Returns Pi/2 |
M_PI_4 | 0.78539816339744830962 | Returns Pi/4 |
M_1_PI | 0.31830988618379067154 | Returns 1/Pi |
M_2_PI | 0.63661977236758134308 | Returns 2/Pi |
M_SQRTPI | 1.77245385090551602729 | Returns the square root of PI: sqrt(pi) |
M_2_SQRTPI | 1.12837916709551257390 | Returns 2/square root of PI: 2/sqrt(pi) |
M_SQRT1_2 | 0.70710678118654752440 | Returns the square root of 1/2: 1/sqrt(2) |
M_SQRT2 | 1.41421356237309504880 | Returns the square root of 2: sqrt(2) |
M_SQRT3 | 1.73205080756887729352 | Returns the square root of 3: sqrt(3) |
NAN | NAN | Not A Number |
PHP_ROUND_HALF_UP | 1 | Round halves up |
PHP_ROUND_HALF_DOWN | 2 | Round halves down |
PHP_ROUND_HALF_EVEN | 3 | Round halves to even numbers |
PHP_ROUND_HALF_ODD | 4 | Round halves to odd numbers |
Parameter | Description |
---|---|
number | Required. Specifies a number. If the number is of type float, the return type is also float, otherwise it is integer |
Return Value: | The absolute value of the number |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number in range -1 to 1 |
Return Value: | The arc cosine of a number. Returns NAN if number is not in the range -1 to 1 |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The inverse hyperbolik cosine of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
PHP Changelog: | PHP 5.3 - acosh() is now available on all platforms |
Parameter | Description |
---|---|
number | Required. Specifies a number in range -1 to 1 |
Return Value: | The arc sine of a number. Returns NAN if number is not in the range -1 to 1 |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The inverse hyperbolic sine of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
PHP Changelog: | PHP 5.3 - asinh() is now available on all platforms |
Parameter | Description |
---|---|
arg | Required. Specifies an argument to process |
Return Value: | The arc tangent of arg in radians |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
y | Required. Specifies the dividend |
x | Required. Specifies the divisor |
Return Value: | The arc tangent of y/x in radians, which is between -Pi and Pi |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The hyperbolic tangent of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
PHP Changelog: | PHP 5.3 - atanh() is now available on all platforms |
Parameter | Description |
---|---|
number | Required. Specifies the number to convert |
frombase | Required. Specifies the original base of number. Has 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 |
tobase | Required. Specifies the base to convert to. Has 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 |
Return Value: | The number converted to the specified base |
---|---|
Return Type: | String |
PHP Version: | 4+ |
Parameter | Description |
---|---|
binary_string | Required. Specifies the binary string to convert.Note: Must be a string! |
Return Value: | The decimal value of binary_string |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the value to round up |
Return Value: | The value rounded up to the nearest integer |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The cosine of number |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The hyperbolic cosine of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
number | Required. Specifies the decimal value to convert |
Return Value: | A string that contains the binary number of the decimal value |
---|---|
Return Type: | String |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the decimal value to convert |
Return Value: | A string that contains the hexadecimal number of the decimal value |
---|---|
Return Type: | String |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the decimal value to convert |
Return Value: | A string that contains the octal number of the decimal value |
---|---|
Return Type: | String |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the degree to convert |
Return Value: | The radian equivalent of number |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
x | Required. Specifies the exponent |
Return Value: | 'e' raised to the power of x |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
x | Required. Specifies the exponent |
Return Value: | 'e' raised to the power of x minus 1 |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
PHP Changelog: | PHP 5.3 - expm1() is now available on all platforms |
Parameter | Description |
---|---|
number | Required. Specifies the value to round down |
Return Value: | The value rounded down to the nearest integer |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
x | Required. Specifies the dividend |
y | Required. Specifies the divisor |
Return Value: | The floating point remainder of x/y |
---|---|
Return Type: | Float |
PHP Version: | 4.2+ |
Return Value: | The largest possible value returned by rand() |
---|---|
Return Type: | Integer |
PHP Version: | 4+ |
Parameter | Description |
---|---|
hex_string | Required. Specifies the hexadecimal string to convert |
Return Value: | The decimal value of hex_string |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |
Parameter | Description |
---|---|
x | Required. Specifies the length of first side |
y | Required. Specifies the length of second side |
Return Value: | The length of the hypotenuse |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
dividend | Required. Specifies a number that will be divided |
divisor | Required. Specifies the number to divide the dividend by |
Return Value: | The integer part of the division |
---|---|
Return Type: | Integer |
PHP Version: | 7+ |
Parameter | Description |
---|---|
value | Required. Specifies the value to check |
Return Value: | TRUE if value is a finite number, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
value | Required. Specifies the value to check |
Return Value: | TRUE if value is an infinite number, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
value | Required. Specifies the value to check |
Return Value: | TRUE if value is 'not a number', FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.2+ |
Return Value: | A pseudo random float value in a range between 0 and 1 |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the value to calculate the logarithm for |
base | Optional. The logarithmic base to use. Default is 'e' |
Return Value: | The natural logarithm of a number, or the logarithm of number to base |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
PHP Changelog: | PHP 4.3: The base parameter were added |
Parameter | Description |
---|---|
number | Required. Specifies the value to calculate the logarithm for |
Return Value: | The base-10 logarithm of number |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies the number to process |
Return Value: | log(1+number) |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
PHP Changelog: | PHP 5.3: The log1p() function is now available on all platforms |
Parameter | Description |
---|---|
array_values | Required. Specifies an array containing the values |
value1,value2,... | Required. Specifies the values to compare (must be at least two values) |
Return Value: | The numerically highest value |
---|---|
Return Type: | Mixed |
PHP Version: | 4+ |
Parameter | Description |
---|---|
array_values | Required. Specifies an array containing the values |
value1,value2,... | Required. Specifies the values to compare (must be at least two values) |
Return Value: | The numerically lowest value |
---|---|
Return Type: | Mixed |
PHP Version: | 4+ |
Return Value: | The largest possible value returned by mt_rand() |
---|---|
Return Type: | Integer |
PHP Version: | 4+ |
Parameter | Description |
---|---|
min | Optional. Specifies the lowest number to be returned. Default is 0 |
max | Optional. Specifies the highest number to be returned. Default is mt_getrandmax() |
Return Value: | A random integer between min (or 0) and max (or mt_getrandmax() inclusive). Returns FALSE if max < min |
---|---|
Return Type: | Integer |
PHP Version: | 4+ |
PHP Changelog: | PHP 7.1: rand() has been an alias of mt_rand()PHP 5.3.4: Issues an E_WARNING and returns FALSE if max < min.PHP 4.2.0: Random number generator is seeded automatically. |
Parameter | Description |
---|---|
seed | Optional. Specifies the seed value |
mode | Optional. Specifies the algorithm to use. Can be one of the following constants:
|
Return Value: | None |
---|---|
Return Type: | - |
PHP Version: | 4+ |
PHP Changelog: | PHP 4.2.0: Random number generator is now seeded automatically |
Parameter | Description |
---|---|
octal_string | Required. Specifies the octal string to convert |
Return Value: | The decimal value of octal_string |
---|---|
Return Type: | Float / Integer |
PHP Version: | 4+ |
Return Value: | 3.1415926535898 |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
x | Required. Specifies the base to use |
y | Required. Specifies the exponent |
Return Value: | x raised to the power of y |
---|---|
Return Type: | Integer if possible, Float otherwise |
PHP Version: | 4+ |
PHP Changelog: | PHP 4.0.6: Will now return integer if possible. Earlier it only returned floatPHP 4.2.0: No warning is issued on errors |
Parameter | Description |
---|---|
number | Required. Specifies a radian value to convert |
Return Value: | The equivalent of number in degrees |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
min | Optional. Specifies the lowest number to be returned. Default is 0 |
max | Optional. Specifies the highest number to be returned. Default is getrandmax() |
Return Value: | A random integer between min (or 0) and max (or getrandmax() inclusive) |
---|---|
Return Type: | Integer |
PHP Version: | 4+ |
PHP Changelog: | PHP 7.1: The rand() function is an alias of mt_rand().PHP 4.2.0: The random number generator is seeded automatically. |
Parameter | Description |
---|---|
number | Required. Specifies the value to round |
precision | Optional. Specifies the number of decimal digits to round to. Default is 0 |
mode | Optional. Specifies a constant to specify the rounding mode:
|
Return Value: | The rounded value |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
PHP Changelog: | PHP 5.3: The mode parameter was added |
Parameter | Description |
---|---|
number | Required. Specifies a value in radians |
Return Value: | The sine of number |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The hyperbolic sine of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The square root of number, or NAN for negative numbers |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
seed | Optional. Specifies the seed value |
Return Value: | None |
---|---|
Return Type: | - |
PHP Version: | 4+ |
PHP Changelog: | PHP 7.1.0: srand() has been an alias of mt_srand().PHP 4.2.0: Random number generator is now seeded automatically. |
Parameter | Description |
---|---|
number | Required. Specifies a value in radians |
Return Value: | The tangent of number |
---|---|
Return Type: | Float |
PHP Version: | 4+ |
Parameter | Description |
---|---|
number | Required. Specifies a number |
Return Value: | The hyperbolic tangent of number |
---|---|
Return Type: | Float |
PHP Version: | 4.1+ |
Name | Description | Default | Changeable |
---|---|---|---|
ignore_user_abort | FALSE indicates that scripts will be terminated as soon as they try to output something after a client has aborted their connection | "0" | PHP_INI_ALL |
highlight.string | Color for highlighting a string in PHP syntax | "#DD0000" | PHP_INI_ALL |
highlight.comment | Color for highlighting PHP comments | "#FF8000" | PHP_INI_ALL |
highlight.keyword | Color for syntax highlighting PHP keywords (e.g. parenthesis and semicolon) | "#007700" | PHP_INI_ALL |
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-capabilities file (e.g. browscap.ini) | NULL | PHP_INI_SYSTEM |
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 |
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__ |
Return Value: | Returns 1 if the connection has been aborted, otherwise it returns 0 |
---|---|
PHP Version: | 4+ |
Return Value: | Returns the connection status bitfield |
---|---|
PHP Version: | 4+ |
Return Value: | Returns 1 if the script has timed out, otherwise it returns 0 |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
constant | Required. Specifies the name of the constant to check |
Return Value: | Returns the value of a constant, or NULL if the constant is not defined |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
name | Required. Specifies the name of the constant |
value | Required. Specifies the value of the constant. |
case_insensitive | Optional. Specifies whether the constant name should be case-insensitive. Possible values: |
Return Value: | Returns TRUE on success or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.3: Defining case-insensitive constants is deprecated.PHP 7: The value parameter can also be an array.PHP 5: The value parameter must be a string, integer, float, boolean or NULL. |
Parameter | Description |
---|---|
name | Required. Specifies the name of the constant to check |
Return Value: | Returns TRUE if the constant exists, or FALSE otherwise |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
message | Required. A message or status number to print before terminating the script. A status number will not be written to the output, just used as the exit status. |
Return Value: | Nothing |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
phpcode | Required. Specifies the PHP code to be evaluated |
Return Value: | Returns NULL unless a return statement is called in the code string. Then the value passed to return is returned. If there is a parse error in the code string, eval() returns FALSE. |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
message | Required. A message or status number to print before terminating the script. A status number will not be written to the output, just used as the exit status. |
Return Value: | Nothing |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
user_agent | Optional. Specifies the name of an HTTP user agent. Default is the value of $HTTP_USER_AGENT. You can bypass this parameter with NULL |
return_array | Optional. If this parameter is set to TRUE, the function will return an array instead of an object |
Return Value: | Returns an object or an array with information about the user's browser on success, or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | The return_array parameter was added in PHP 4.3.2 |
Return Value: | Nothing |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
filename | Required. Specifies the file to be highlighted |
return | Optional. If set to TRUE, this function will return the highlighted code as a string, instead of printing it out. Default is FALSE |
Return Value: | If the return parameter is set to TRUE, this function returns the highlighted code as a string instead of printing it out. Otherwise, it returns TRUE on success, or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 4.2.1 - This function is now also affected by safe_mode and open_basedir. However, safe_mode was deprecated and removed in PHP 5.4.PHP 4.2 - The return parameter was added. |
Parameter | Description |
---|---|
string | Required. Specifies the string to be highlighted |
return | Optional. If set to TRUE, this function will return the highlighted code as a string, instead of printing it out. Default is FALSE |
Return Value: | Returns TRUE on success, or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | The return parameter was added in PHP 4.2.0 |
Parameter | Description |
---|---|
return_as_num | Optional. If set to TRUE, this function will return the high resolution time as array or number. Default is FALSE |
Return Value: | Returns nanoseconds or an array of integers |
---|---|
PHP Version: | 7.3+ |
Parameter | Description |
---|---|
setting | Optional. TRUE ignores user aborts in a script (the script will continue to run). This is FALSE by default, meaning that client aborts will cause the script to stop running |
Return Value: | Returns the previous value of the user-abort setting |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
format | Required. Specifies the format to use when packing data.
Possible values:
|
args+ | Optional. Specifies one or more arguments to be packed |
Return Value: | Returns data in a binary string |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.2 - float and double now supports both big and small endian.PHP 7.0.15 - The "E", "e", "G", "g" code was added.PHP 5.6.3 - The "Q", "q", "J", "P" code was added.PHP 5.5 - The "Z" code was added (holds the same functionality as "a" for Perl compatibility). |
Parameter | Description |
---|---|
filename | Required. Specifies the file to strip |
Return Value: | Returns the stripped source code on success, or an empty string on failure. Note: This function only returns an empty string on versions before PHP 5.0.1. |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
filename | Required. Specifies the file to display |
return | Optional. If set to TRUE, this function will return the highlighted code as a string, instead of printing it out. Default is FALSE |
Return Value: | If the return parameter is set to TRUE, this function returns the highlighted code as a string instead of printing it out. Otherwise, it returns TRUE on success, or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 4.2.1, this function is now also affected by safe_mode and open_basedir. However, safe_mode was removed in PHP 5.4.PHP 4.2 - The return parameter was added. |
Parameter | Description |
---|---|
seconds | Required. Specifies the number of seconds to delay the script |
Return Value: | Returns 0 on success, or FALSE on error.This function returns a non-zero value if the call was interrupted by a signal. On Windows, this value will always be 192, which is the value of the WAIT_IO_COMPLETION constant within the Windows API. On other platforms, the return value will be the number of seconds left to sleep. |
---|---|
PHP Version: | 4+ |
Changelog: | Before PHP 5.3.4, this function always returns NULL when sleep has occurred on Windows. |
Return Value: | Returns an array with three samples (last 1, 5 and 15 minutes) |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
seconds | Required. Specifies the number of seconds to delay the script |
nanoseconds | Required. Specifies the number of nanoseconds to delay the script (must be less than 1,000,000,000) |
Return Value: | Returns TRUE on success, or FALSE on failure.If the call was interrupted by a signal, an associative array will be returned with the number of seconds or nanoseconds remaining in the delay. |
---|---|
PHP Version: | 5+ |
Changelog: | This function did not work on Windows platforms prior PHP 5.3.0 |
Parameter | Description |
---|---|
timestamp | Required. Specifies when the script should wake |
Return Value: | Returns TRUE on success, or FALSE on failure |
---|---|
PHP Version: | 5.1.0+ |
Changelog: | This function did not work on Windows platforms until PHP 5.3.0 |
Parameter | Description |
---|---|
prefix | Optional. Specifies a prefix to the unique ID (useful if two scripts generate ids at exactly the same microsecond) |
more_entropy | Optional. Specifies more entropy at the end of the return value. This will make the result more unique. When set to TRUE, the return string will be 23 characters. Default is FALSE, and the return string will be 13 characters long |
Return Value: | Returns the unique identifier, as a string |
---|---|
PHP Version: | 4+ |
Changelog: | The prefix parameter became optional in PHP 5.0.The limit of 114 characters long for prefix was raised in PHP 4.3.1. |
Parameter | Description |
---|---|
format | Required. Specifies the format to use when unpacking data.
Possible values:
|
data | Required. Specifies the binary data to be unpacked |
offset | Optional. Specifies where to start unpacking from. Default is 0. |
Return Value: | Returns an array on success, or FALSE on failure. |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.2 - float and double now supports both big and small endian.PHP 7.1 - Added the optional offset parameter.PHP 5.5.0 - The following changes were made for Perl compatibility: The "a" code now retains trailing NULL bytes.The "A" code now strips all trailing ASCII whitespace.The "Z" code was added for NULL-padded strings, and removes trailing NULL bytes. |
Parameter | Description |
---|---|
microseconds | Required. Specifies the number of microseconds to delay the script |
Return Value: | No value is returned |
---|---|
PHP Version: | 4+ |
Changelog: | This function did not work on Windows platforms until PHP 5 |
Function | Description |
---|---|
affected_rows() | Returns the number of affected rows in the previous MySQL operation |
autocommit() | Turns on or off auto-committing database modifications |
begin_transaction() | Starts a transaction |
change_user() | Changes the user of the specified database connection |
character_set_name() | Returns the default character set for the database connection |
close() | Closes a previously opened database connection |
commit() | Commits the current transaction |
connect() | Opens a new connection to the MySQL server |
connect_errno() | Returns the error code from the last connection error |
connect_error() | Returns the error description from the last connection error |
data_seek() | Adjusts the result pointer to an arbitrary row in the result-set |
debug() | Performs debugging operations |
dump_debug_info() | Dumps debugging info into the log |
errno() | Returns the last error code for the most recent function call |
error() | Returns the last error description for the most recent function call |
error_list() | Returns a list of errors for the most recent function call |
fetch_all() | Fetches all result rows as an associative array, a numeric array, or both |
fetch_array() | Fetches a result row as an associative, a numeric array, or both |
fetch_assoc() | Fetches a result row as an associative array |
fetch_field() | Returns the next field in the result-set, as an object |
fetch_field_direct() | Returns meta-data for a single field in the result-set, as an object |
fetch_fields() | Returns an array of objects that represent the fields in a result-set |
fetch_lengths() | Returns the lengths of the columns of the current row in the result-set |
fetch_object() | Returns the current row of a result-set, as an object |
fetch_row() | Fetches one row from a result-set and returns it as an enumerated array |
field_count() | Returns the number of columns for the most recent query |
field_seek() | Sets the field cursor to the given field offset |
get_charset() | Returns a character set object |
get_client_info() | Returns the MySQL client library version |
get_client_stats() | Returns statistics about client per-process |
get_client_version() | Returns the MySQL client library version as an integer |
get_connection_stats() | Returns statistics about the client connection |
get_host_info() | Returns the MySQL server hostname and the connection type |
get_proto_info() | Returns the MySQL protocol version |
get_server_info() | Returns the MySQL server version |
get_server_version() | Returns the MySQL server version as an integer |
info() | Returns information about the last executed query |
init() | Initializes MySQLi and returns a resource for use with real_connect() |
insert_id() | Returns the auto-generated id from the last query |
kill() | Asks the server to kill a MySQL thread |
more_results() | Checks if there are more results from a multi query |
multi_query() | Performs one or more queries on the database |
next_result() | Prepares the next result-set from multi_query() |
options() | Sets extra connect options and affect behavior for a connection |
ping() | Pings a server connection, or tries to reconnect if the connection has gone down |
poll() | Polls connections |
prepare() | Prepares an SQL statement for execution |
query() | Performs a query against a database |
real_connect() | Opens a new connection to the MySQL server |
real_escape_string() | Escapes special characters in a string for use in an SQL statement |
real_query() | Executes a single SQL query |
reap_async_query() | Returns result from an async SQL query |
refresh() | Refreshes/flushes tables or caches, or resets the replication server information |
rollback() | Rolls back the current transaction for the database |
select_db() | Select the default database for database queries |
set_charset() | Sets the default client character set |
set_local_infile_default() | Unsets user defined handler for load local infile command |
set_local_infile_handler() | Set callback function for LOAD DATA LOCAL INFILE command |
sqlstate() | Returns the SQLSTATE error code for the error |
ssl_set() | Used to establish secure connections using SSL |
stat() | Returns the current system status |
stmt_init() | Initializes a statement and returns an object for use with stmt_prepare() |
store_result() | Transfers a result-set from the last query |
thread_id() | Returns the thread ID for the current connection |
thread_safe() | Returns whether the client library is compiled as thread-safe |
use_result() | Initiates the retrieval of a result-set from the last query executed |
warning_count() | Returns the number of warnings from the last query in the connection |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | The number of rows affected. -1 indicates that the query returned an error |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
mode | Required. FALSE turns auto-commit off. TRUE turns auto-commit on (and commits any waiting queries) |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
username | Required. Specifies the MySQL user name |
password | Required. Specifies the MySQL password |
dbname | Required. Specifies the database to change to |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | The default character set for the specified connection |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to close |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
flags | Optional. A constant:
|
name | Optional. COMMIT/*name*/ is executed if this parameter is specified |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.5: Added the flags and name parameters |
Parameter | Description |
---|---|
host | Optional. Specifies a host name or an IP address |
username | Optional. Specifies the MySQL username |
password | Optional. Specifies the MySQL password |
dbname | Optional. Specifies the default database to be used |
port | Optional. Specifies the port number to attempt to connect to the MySQL server |
socket | Optional. Specifies the socket or named pipe to be used |
Return Value: | Returns an object representing the connection to the MySQL server |
---|---|
PHP Version: | 5+ |
Return Value: | Returns an error code value. Zero if no error occurred |
---|---|
PHP Version: | 5+ |
Return Value: | Returns a string that describes the error. NULL if no error occurred |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
offset | Required. Specifies the field offset. Must be between 0 and the total number of rows - 1 |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
message | Required. A string that represents the debugging operation to perform |
Return Value: | TRUE |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
link | Required. A link identifier returned by connect() or init() |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an error code value. Zero if no error occurred |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns a string with the error description. " if no error occurred |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns a list of errors as an associative array; with errno (error code), error (error text), and sqlstate |
---|---|
PHP Version: | 5.4+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
resulttype | Optional. Specifies what type of array that should be produced. Can be one of the following values:
|
Return Value: | Returns an array of associative or numeric arrays holding the result rows |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
resulttype | Optional. Specifies what type of array that should be produced. Can be one of the following values:
|
Return Value: | Returns an array of strings that corresponds to the fetched row. NULL if there are no more rows in result-set |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
Return Value: | Returns an associative array of strings representing the fetched row. NULL if there are no more rows in result-set |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
Return Value: | Returns an object containing field definition information. FALSE if no info is available. The object has the following properties:
|
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
fieldnr | Required. Specifies the field number. Must be an integer from 0 to number of fields-1 |
Return Value: | Returns an object containing field definition information. FALSE if no info is available. The object has the following properties:
|
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
Return Value: | Returns an array of objects containing field definition information. FALSE if no info is available. The objects have the following properties:
|
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
Return Value: | Returns an array of integers that represents the size of each field (column). FALSE if an error occurs |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
classname | Optional. Specifies the name of the class to instantiate, set the properties of, and return |
params | Optional. Specifies an array of parameters to pass to the constructor for classname objects |
Return Value: | Returns an object with string properties for the fetched row. NULL if there are no more rows in the result set |
---|---|
PHP Version: | 5+ |
Changelog: | The ability to return as a different object was added in PHP 5.0.0 |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
Return Value: | Returns an array of strings that corresponds to the fetched row. NULL if there are no more rows in result set |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an integer that represents the number of columns in the result set |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
result | Required. Specifies a result set identifier returned by mysqli_query(), mysqli_store_result() or mysqli_use_result() |
fieldnr | Required. Specifies the field number. Must be an integer from 0 to number of fields-1 |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns a character set object with the following properties:
|
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
connection | Optional. Specifies the MySQL connection to use |
Return Value: | Returns a string that represents the MySQL client library version |
---|---|
PHP Version: | 5+ |
Return Value: | An array with client stats on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
connection | Optional. Specifies the MySQL connection to use |
Return Value: | Returns an integer that represents the MySQL client version |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an array with connection stats on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns a string that represents the MySQL server hostname and the connection type |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an integer that represents the MySQL protocol version |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | A string that represents the MySQL server version |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an integer that represents the MySQL server version |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | A string that contains additional info about the last executed query |
---|---|
PHP Version: | 5+ |
Return Value: | An object to use with the mysqli_real_connect() function |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | An integer that represents the value of the AUTO_INCREMENT field updated by the last query. Returns zero if there were no update or no AUTO_INCREMENT field |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
processid | Required. The thread ID returned from thread_id() |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | TRUE if there is one or more result sets available from multi_query(). FALSE otherwise |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
query | Required. Specifies one or more queries, separated with semicolon |
Return Value: | FALSE if the first query fails |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
option | Required. Specifies the option to set. Can be one of the following values:
|
value | Required. Specifies the value for the option |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.5: Added MYSQLI_SERVER_PUBLIC_KEY optionPHP 5.3: Added MYSQLI_OPT_INT_AND_FLOAT_NATIVE, MYSQLI_OPT_NET_CMD_BUFFER_SIZE, MYSQLI_OPT_NET_READ_BUFFER_SIZE, and MYSQLI_OPT_SSL_VERIFY_SERVER_CERT options |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
read | Required. Specifies a list of connections to check for outstanding results that can be read |
error | Required. Specifies a list of connections on which an error occurred, like query failure or lost connection |
reject | Required. Specifies a list of connections rejected because no asynchronous query has been run on for which the function could poll results |
seconds | Required. Specifies the maximum number of seconds to wait |
microseconds | Optional. Specifies the maximum number of microseconds to wait. Default is 0 |
Return Value: | The number of ready connections on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
query | Required. Specifies an SQL query. Note: Do not add semicolon to the end of the query! |
Return Value: | A statement object on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
query | Required. Specifies the SQL query string |
resultmode |
Optional. A constant. Can be one of the following:
|
Return Value: | For successful SELECT, SHOW, DESCRIBE, or EXPLAIN queries it will return a mysqli_result object. For other successful queries it will return TRUE. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.3.0 added the ability for async queries |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
host | Optional. Specifies a host name or an IP address |
username | Optional. Specifies the MySQL username |
password | Optional. Specifies the MySQL password |
dbname | Optional. Specifies the default database to be used |
port | Optional. Specifies the port number to attempt to connect to the MySQL server |
socket | Optional. Specifies the socket or named pipe to be used |
flag | Optional. Specifies different connection options. Possible values:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.6: Added MYSQLI_CLIENT_SSL_DONT_VERIFY_SERVER_CERT flag |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
escapestring | Required. The string to be escaped. Characters encoded are NUL (ASCII 0), \n, \r, \, ', ", and Control-Z. |
Return Value: | Returns the escaped string |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
query | Required. The query to be executed |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | mysqli_result on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
options | The options to refresh. Can be one of more of the following (separated by OR):
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
flags | Optional. A constant:
|
name | Optional. ROLLBACK/*name*/ is executed if this parameter is specified |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
PHP Changelog: | PHP 5.5: Added the flags and name parameters |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
name | Required. Specifies the database name |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
charset | Required. Specifies the default character set |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5.0.5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
read_func | Required. Specifies a callback function or objext that can take the following params:stream - A PHP stream associated with the SQL commands INFILE&buffer - A string buffer to store the rewritten input into buflen - The maximum number of characters to be stored in the buffer&erromsg - If an error occurs you can store an error message in here |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | A string containing the SQLSTATE error code for the last error |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
key | Required. Specifies the path name to the key file |
cert | Required. Specifies the path name to the certificate file |
ca | Required. Specifies the path name to the certificate authority file |
capath | Required. Specifies the pathname to a directory that contains trusted SSL CA certificates in PEM format |
cipher | Required. Specifies a list of allowable ciphers to use for SSL encryption |
Return Value: | Always TRUE. If SSL setup is incorrect, real_connect() will return an error when you try to connect |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | A string that describes the server status. FALSE on error |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an object |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns the thread ID for the current connection |
---|---|
PHP Version: | 5+ |
Return Value: | TRUE if the client library is thread-safe. FALSE otherwise |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | Returns an unbuffered result object. FALSE on error |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
connection | Required. Specifies the MySQL connection to use |
Return Value: | The number of warnings from the last query. 0 if no warnings |
---|---|
PHP Version: | 5+ |
Function | Description |
---|---|
checkdnsrr() | Checks DNS records for type corresponding to host |
closelog() | Closes the connection of system logger |
define_syslog_variables() | Deprecated and removed in PHP 5.4. Initializes the variables used in syslog functions |
dns_check_record() | Alias of checkdnsrr() |
dns_get_mx() | Alias of getmxrr() |
dns_get_record() | Gets the DNS resource records associated with the specified hostname |
fsockopen() | Opens an Internet or Unix domain socket connection |
gethostbyaddr() | Returns the domain name for a given IP address |
gethostbyname() | Returns the IPv4 address for a given domain/host name |
gethostbynamel() | Returns a list of IPv4 address for a given domain/host name |
gethostname() | Returns the host name |
getmxrr() | Returns the MX records for the specified internet host name |
getprotobyname() | Returns the protocol number for a given protocol name |
getprotobynumber() | Returns the protocol name for a given protocol number |
getservbyname() | Returns the port number for a given Internet service and protocol |
getservbyport() | Returns the Internet service for a given port and protocol |
header_register_callback() | Calls a header function |
header_remove() | Removes an HTTP header previously set with the header() function |
header() | Sends a raw HTTP header to a client |
headers_list() | Returns a list of response headers to be sent to the browser |
headers_sent() | Checks if/where headers have been sent |
http_response_code() | Sets or returns the HTTP response status code |
inet_ntop() | Converts a 32bit IPv4 or 128bit IPv6 address into a readable format |
inet_pton() | Converts a readable IP address into a packed 32bit IPv4 or 128bit IPv6 format |
ip2long() | Converts an IPv4 address into a long integer |
long2ip() | Converts a long integer address into a string in IPv4 format |
openlog() | Opens the connection of system logger |
pfsockopen() | Opens a persistent Internet or Unix domain socket connection |
setcookie() | Defines a cookie to be sent along with the rest of the HTTP headers |
setrawcookie() | Defines a cookie (without URL encoding) to be sent along with the rest of the HTTP headers |
socket_get_status() | Alias of stream_get_meta_data() |
socket_set_blocking() | Alias of stream_set_blocking() |
socket_set_timeout() | Alias of stream_set_timeout() |
syslog() | Generates a system log message |
Parameter | Description |
---|---|
host | Required. Specifies an IP address or host name to check |
type | Optional. Specifies the type. Can be one of the following:
|
Return Value: | TRUE if any records are found, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: Now available on Windows platformsPHP 5.2.4: Added the TXT value of type |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
host | Required. Specifies an IP address or host name to check |
type | Optional. Specifies the type. Can be one of the following:
|
Return Value: | TRUE if any records are found, FALSE otherwise |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
host | Required. Specifies the host name |
mxhosts | Required. An array that specifies a list of MX records found |
weight | Optional. An array that specifies the weight information gathered |
Return Value: | TRUE if any records are found, FALSE otherwise |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com") |
type | Optional. Specifies the resource record type to search for. Can be one of the following:
|
authns | Optional. Passed by reference and, if set, it will be populated with Resource Records for the Authoritative Name Servers |
addtl | Optional. Passed by reference and, if set, it will be populated with any Additional Records |
raw | Optional. A Boolean value. If set to TRUE, it queries only the requested type instead of looping type-by-type before getting the info stuff. Default is FALSE |
Return Value: |
An array of associative arrays, FALSE on failure. Each array contains the
following keys (at minimum):
|
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | PHP 7.0.16: Added support for DNS_CAA type.PHP 5.4: Added the raw parameter.PHP 5.3: Available on Windows platforms. |
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com"). ssl:// or tls:// works over TCP/IP to connect to the remote host |
port | Optional. Specifies the port number. Use -1 for transports that do not use ports, like unix:// |
errno | Optional. Specifies the system level error number |
errstr | Optional. Specifies the error message as a string |
timeout | Optional. Specifies the connection timeout (in seconds) |
Return Value: | A file pointer that can be used with other file functions (such as fgets(), fwrite(), fclose()). FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
ipaddress | Required. Specifies an IP address |
Return Value: | The host name on success. The IP address or FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com") |
Return Value: | The IPv4 address on success. The hostname on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com") |
Return Value: | An array of IPv4 address on success. FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Return Value: | The host name on success. FALSE on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
host | Required. Specifies the host name |
mxhosts | Required. An array that specifies a list of MX records found |
weight | Optional. An array that specifies the weight information gathered |
Return Value: | TRUE if any records are found, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.3: Now available on Windows platforms |
Parameter | Description |
---|---|
protocolname | Required. Specifies a protocol name (like "tcp") |
Return Value: | The protocol number on success. FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
protocolnumber | Required. Specifies a protocol number (like 17) |
Return Value: | The protocol name on success. FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
service | Required. Specifies the Internet service name (like "http") |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Return Value: | The port number on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
port | Required. Specifies the port number (like 80) |
protocol | Required. Specifies a protocol name (like "tcp" or "udp") |
Return Value: | The Internet Service name on success |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
callback | Required. Specifies a callback function |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5.4+ |
Parameter | Description |
---|---|
headername | Optional. Specifies a header name to be removed. If omitted, all previously set headers are removed |
Return Value: | Nothing |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
header | Required. Specifies the header string to send |
replace | Optional. Indicates whether the header should replace a previous similar header or add a new header of the same type. Default is TRUE (will replace). FALSE allows multiple headers of the same type |
http_response_code | Optional. Forces the HTTP response code to the specified value |
Return Value: | Nothing |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.1.2: Now prevents that more than one header to be sent at once. This is a protection against header injection attacks |
Return Value: | A numerically indexed array of headers on success |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
file | Optional. If the file and line parameters are set, headers_sent() will put the PHP source file name and line number where output started in the file and line variables |
line | Optional. Specifies the line number where the output started |
Return Value: | TRUE if HTTP headers has been sent, FALSE otherwise |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 4.3: Added the optional file and line parameters |
Parameter | Description |
---|---|
code | Optional. Specifies a response code (like 404) |
Return Value: | If code is set, the previous status code is returned. If code is not set, the current status code is returned |
---|---|
PHP Version: | 5.4+ |
Parameter | Description |
---|---|
address | Required. Specifies a 32bit IPv4 or 128bit IPv6 address |
Return Value: | A human readable address on success. FALSE on failure |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 5.3: Now available on Windows platforms |
Parameter | Description |
---|---|
address | Required. Specifies a readable IP address |
Return Value: | The address as a packed 32bit IPv4 or 128bit IPv6 format. FALSE on failure |
---|---|
PHP Version: | 5.1+ |
PHP Changelog: | PHP 5.3: Now available on Windows platforms |
Parameter | Description |
---|---|
address | Required. Specifies a standard IP address |
Return Value: | A long integer. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.5: Before this version, on Windows, this function might return a valid number even if the passed value was not an IPv4 address.PHP 5.2: PHP 5.5: Before this version, this function might return a valid number even if the passed value was not an IPv4 address. |
Parameter | Description |
---|---|
address | Required. Specifies a long integer that represents an IP address |
Return Value: | The IP address as a string |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.1: Changed the address parameter from string to integer. |
Parameter | Description |
---|---|
ident | Required. Specifies a string ident that is added to each message |
option | Required. Specifies what logging options will be used when generating a
log message. Can be one or more of the following options (separated with |):
|
facility | Required. Specifies what type of program is logging the message:
|
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
hostname | Required. Specifies a hostname (like "www.w3schools.com"). ssl:// or tls:// works over TCP/IP to connect to the remote host |
port | Optional. Specifies the port number. Use -1 for transports that do not use ports, like unix:// |
errno | Optional. Specifies the system level error number |
errstr | Optional. Specifies the error message as a string |
timeout | Optional. Specifies the connection timeout (in seconds) |
Return Value: | A file pointer that can be used with other file functions (such as fgets(), fwrite(), fclose()). FALSE on failure. |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
name | Required. Specifies the name of the cookie |
value | Optional. Specifies the value of the cookie |
expire | Optional. Specifies when the cookie expires. The value: time()+86400*30, will set the cookie to expire in 30 days. If this parameter is omitted or set to 0, the cookie will expire at the end of the session (when the browser closes). Default is 0 |
path | Optional. Specifies the server path of the cookie. If set to "/", the cookie will be available within the entire domain. If set to "/php/", the cookie will only be available within the php directory and all sub-directories of php. The default value is the current directory that the cookie is being set in |
domain | Optional. Specifies the domain name of the cookie. To make the cookie available on all subdomains of example.com, set domain to "example.com". Setting it to www.example.com will make the cookie only available in the www subdomain |
secure | Optional. Specifies whether or not the cookie should only be transmitted over a secure HTTPS connection. TRUE indicates that the cookie will only be set if a secure connection exists. Default is FALSE |
httponly | Optional. If set to TRUE the cookie will be accessible only through the HTTP protocol (the cookie will not be accessible by scripting languages). This setting can help to reduce identity theft through XSS attacks. Default is FALSE |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4+ |
PHP Changelog: | PHP 5.5 - A Max-Age attribute was included in the Set-Cookie header sent to the clientPHP 5.2 - The httponly parameter was added |
Parameter | Description |
---|---|
name | Required. Specifies the name of the cookie |
value | Optional. Specifies the value of the cookie |
expire | Optional. Specifies when the cookie expires. The value: time()+86400*30, will set the cookie to expire in 30 days. If this parameter is not set, the cookie will expire at the end of the session (when the browser closes) |
path | Optional. Specifies the server path of the cookie. If set to "/", the cookie will be available within the entire domain. If set to "/php/", the cookie will only be available within the php directory and all sub-directories of php. The default value is the current directory that the cookie is being set in |
domain | Optional. Specifies the domain name of the cookie. To make the cookie available on all subdomains of example.com, set domain to ".example.com". Setting it to www.example.com will make the cookie only available in the www subdomain |
secure | Optional. Specifies whether or not the cookie should only be transmitted over a secure HTTPS connection. TRUE indicates that the cookie will only be set if a secure connection exists. Default is FALSE. |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
priority | Required. Specifies ... Can be one of the following options:
|
message | Required. Specifies the message to send |
Return Value: | TRUE on success, FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Function | Description |
---|---|
__construct() | Creates a new SimpleXMLElement object |
__toString() | Returns the string content of an element |
addAttribute() | Appends an attribute to the SimpleXML element |
addChild() | Appends a child element the SimpleXML element |
asXML() | Returns a well-formed XML string (XML version 1.0) from a SimpleXML object |
attributes() | Returns the attributes/values of an element |
children() | Returns the children of a specified node |
count() | Counts the children of a specified node |
getDocNamespaces() | Returns the namespaces declared in document |
getName() | Returns the name of an element |
getNamespaces() | Returns the namespaces used in document |
registerXPathNamespace() | Creates a namespace context for the next XPath query |
saveXML() | Alias of asXML() |
simplexml_import_dom() | Returns a SimpleXMLElement object from a DOM node |
simplexml_load_file() | Converts an XML document to an object |
simplexml_load_string() | Converts an XML string to an object |
xpath() | Runs an XPath query on XML data |
Function | Description |
---|---|
current() | Returns the current element |
getChildren() | Returns the child elements of the current element |
hasChildren() | Checks whether the current element has children |
key() | Returns the XML tag name of the current element |
next() | Moves to the next element |
rewind() | Rewinds to the first element |
valid() | Checks whether the current element is valid |
Parameter | Description |
---|---|
data | Required. Specifies A well-formed XML string or the path or URL to an XML document if data_is_url is TRUE |
options | Optional. Specifies additional Libxml parameters. Is set by specifying the option and 1 or 0 (TRUE or FALSE, e.g. LIBXML_NOBLANKS(1))
Possible values:
|
data_is_url | Optional. TRUE specifies that data is a path/URL to an XML document instead of string data. Default is FALSE |
ns | Optional. Specifies a namespace prefix or URI |
is_prefix | Optional. Specifies a Boolean value. TRUE if ns is a prefix. FALSE if ns is a URI. Default is FALSE |
Return Value: | Returns a SimpleXMLElement object that represents data |
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | PHP 5.2.0: Added the optional ns and is_prefix parameters.PHP 5.1.2: Added the optional options and data_is_url parameters. |
Return Value: | The string content on success. An empty string on failure |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
name | Required. Specifies the name of the attribute to add |
value | Optional. Specifies the value of the attribute |
ns | Optional. Specifies a namespace for the attribute |
Return Value: | Nothing |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
name | Required. Specifies the name of the child element to add |
value | Optional. Specifies the value of the child element |
ns | Optional. Specifies a namespace for the child element |
Return Value: | A SimpleXMLElement object that represents the child added to the XML node |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
filename | Optional. If specified, the data is written to the file, instead of returning a string |
Return Value: | A string (or TRUE if the filename parameter is set) on success. FALSE on failure |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
ns | Optional. Specifies a namespace for the retrieved attributes |
prefix | Optional. Specifies TRUE if ns is a prefix and FALSE if ns is a URI. Default is FALSE |
Return Value: | A SimpleXMLElement object on success |
---|---|
PHP Version: | 5.0+ |
Parameter | Description |
---|---|
ns | Optional. Specifies an XML namespace |
prefix | Optional. A Boolean value. If TRUE ns is regarded as a prefix. If FALSE ns is regarded as a namespace URL. Default is FALSE |
Return Value: | Returns a SimpleXMLElement object |
---|---|
PHP Version: | 5.0+ |
PHP Changelog: | PHP 5.2: Added the optional prefix parameter |
Return Value: | The number of child elements of an element |
---|---|
PHP Version: | 5.3+ |
Parameter | Description |
---|---|
recursive | Optional. Specifies a Boolean value. If TRUE, all namespaces declared in document are returned. If FALSE, only namespaces declared in root node is returned. Default is FALSE |
from_root | Optional. Specifies a Boolean value. TRUE checks namespaces from the root of the XML document. FALSE checks namespaces under a child node. Default is TRUE |
Return Value: | An array of namespace names with their associated URIs |
---|---|
PHP Version: | 5.1.2+ |
PHP Changelog: | PHP 5.4: The from_root parameter was added |
Return Value: | The name of the XML element, as a string |
---|---|
PHP Version: | 5.1.3+ |
Parameter | Description |
---|---|
recursive | Optional. Specifies a Boolean value. If TRUE, all namespaces used in document are returned. If FALSE, only namespaces used in root node is returned. Default is FALSE |
Return Value: | An array of namespace names with their associated URIs |
---|---|
PHP Version: | 5.1.2+ |
Parameter | Description |
---|---|
prefix | Required. Specifies the namespace prefix to use in the XPath query for the namespace given in ns |
ns | Required. Specifies the namespace to use for the XPath query |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 5.1+ |
Parameter | Description |
---|---|
node | Required. Specifies a DOM element node |
classname | Optional. Specifies the class of the new object |
Return Value: | A SimpleXMLElement object on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
file | Required. Specifies the path to the XML file |
class | Optional. Specifies the class of the new object |
options | Optional. Specifies additional Libxml parameters. Is set by specifying the option and 1 or 0 (TRUE or FALSE, e.g. LIBXML_NOBLANKS(1))
Possible values:
|
ns | Optional. Specifies a namespace prefix or URI |
is_prefix | Optional. Specifies a Boolean value. TRUE if ns is a prefix. FALSE if ns is a URI. Default is FALSE |
Return Value: | A SimpleXMLElement object on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
data | Required. Specifies a well-formed XML string |
class | Optional. Specifies the class of the new object |
options | Optional. Specifies additional Libxml parameters. Is set by specifying the option and 1 or 0 (TRUE or FALSE, e.g. LIBXML_NOBLANKS(1))
Possible values:
|
ns | Optional. Specifies a namespace prefix or URI |
is_prefix | Optional. Specifies a Boolean value. TRUE if ns is a prefix. FALSE if ns is a URI. Default is FALSE |
Return Value: | A SimpleXMLElement object on success. FALSE on failure |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
path | Required. Specifies an XPath path to use |
Return Value: | An array of SimpleXMLElements on success. FALSE on failure |
---|---|
PHP Version: | 5.0+ |
Return Value: | The current element (as a SimpleXMLIterator object) on success. NULL on failure |
---|---|
PHP Version: | 5.0+ |
Return Value: | A SimpleXMLIterator object containing the children of the current element |
---|---|
PHP Version: | 5.0+ |
Return Value: | TRUE if the current element has children. FALSE otherwise |
---|---|
PHP Version: | 5.0+ |
Return Value: | The XML tag name of the current element on success. FALSE otherwise |
---|---|
PHP Version: | 5.0+ |
Return Value: | Nothing |
---|---|
PHP Version: | 5.0+ |
Return Value: | Nothing |
---|---|
PHP Version: | 5.0+ |
Return Value: | TRUE if element is valid. FALSE otherwise |
---|---|
PHP Version: | 5.0+ |
Function | Description |
---|---|
set_socket_blocking() | Deprecated in PHP 5.4, and removed in PHP 7.0. Alias of stream_set_blocking() |
stream_bucket_prepend() | |
stream_context_create() | |
stream_context_get_default() | |
stream_context_get_options() | |
stream_context_get_params() | |
stream_context_set_default() | |
stream_context_set_options() | |
stream_context_set_params() | |
stream_copy_to_stream() | Copies data from one stream to another |
stream_filter_append() | Appends a filter to a stream |
stream_filter_prepend() | |
stream_filter_register() | |
stream_filter_remove() | |
stream_get_contents() | |
stream_get_filters() | |
stream_get_line() | |
stream_get_meta_data() | |
stream_get_transports() | |
stream_get_wrappers() | |
stream_is_local() | |
stream_isatty() | |
stream_notification_callback() | |
stream_register_wrapper() | Alias of stream_wrapper_register() |
stream_resolve_include_path() | |
stream_select() | |
stream_set_blocking() | |
stream_set_chunk_size() | |
stream_set_read_buffer() | |
stream_set_timeout() | |
stream_set_write_buffer() | |
stream_socket_accept() | |
stream_socket_client() | |
stream_socket_enable_crypto() | |
stream_socket_get_name() | |
stream_socket_pair() | |
stream_socket_recvfrom() | |
stream_socket_sendto() | |
stream_socket_server() | |
stream_socket_shutdown() | |
stream_supports_lock() | |
stream_wrapper_register() | |
stream_wrapper_restore() | |
stream_wrapper_unregister() |
Function | Description |
---|---|
addcslashes() | Returns a string with backslashes in front of the specified characters |
addslashes() | Returns a string with backslashes in front of predefined characters |
bin2hex() | Converts a string of ASCII characters to hexadecimal values |
chop() | Removes whitespace or other characters from the right end of a string |
chr() | Returns a character from a specified ASCII value |
chunk_split() | Splits a string into a series of smaller parts |
convert_cyr_string() | Converts a string from one Cyrillic character-set to another |
convert_uudecode() | Decodes a uuencoded string |
convert_uuencode() | Encodes a string using the uuencode algorithm |
count_chars() | Returns information about characters used in a string |
crc32() | Calculates a 32-bit CRC for a string |
crypt() | One-way string hashing |
echo() | Outputs one or more strings |
explode() | Breaks a string into an array |
fprintf() | Writes a formatted string to a specified output stream |
get_html_translation_table() | Returns the translation table used by htmlspecialchars() and htmlentities() |
hebrev() | Converts Hebrew text to visual text |
hebrevc() | Converts Hebrew text to visual text and new lines (\n) into <br> |
hex2bin() | Converts a string of hexadecimal values to ASCII characters |
html_entity_decode() | Converts HTML entities to characters |
htmlentities() | Converts characters to HTML entities |
htmlspecialchars_decode() | Converts some predefined HTML entities to characters |
htmlspecialchars() | Converts some predefined characters to HTML entities |
implode() | Returns a string from the elements of an array |
join() | Alias of implode() |
lcfirst() | Converts the first character of a string to lowercase |
levenshtein() | Returns the Levenshtein distance between two strings |
localeconv() | Returns locale numeric and monetary formatting information |
ltrim() | Removes whitespace or other characters from the left side of a string |
md5() | Calculates the MD5 hash of a string |
md5_file() | Calculates the MD5 hash of a file |
metaphone() | Calculates the metaphone key of a string |
money_format() | Returns a string formatted as a currency string |
nl_langinfo() | Returns specific local information |
nl2br() | Inserts HTML line breaks in front of each newline in a string |
number_format() | Formats a number with grouped thousands |
ord() | Returns the ASCII value of the first character of a string |
parse_str() | Parses a query string into variables |
print() | Outputs one or more strings |
printf() | Outputs a formatted string |
quoted_printable_decode() | Converts a quoted-printable string to an 8-bit string |
quoted_printable_encode() | Converts an 8-bit string to a quoted printable string |
quotemeta() | Quotes meta characters |
rtrim() | Removes whitespace or other characters from the right side of a string |
setlocale() | Sets locale information |
sha1() | Calculates the SHA-1 hash of a string |
sha1_file() | Calculates the SHA-1 hash of a file |
similar_text() | Calculates the similarity between two strings |
soundex() | Calculates the soundex key of a string |
sprintf() | Writes a formatted string to a variable |
sscanf() | Parses input from a string according to a format |
str_getcsv() | Parses a CSV string into an array |
str_ireplace() | Replaces some characters in a string (case-insensitive) |
str_pad() | Pads a string to a new length |
str_repeat() | Repeats a string a specified number of times |
str_replace() | Replaces some characters in a string (case-sensitive) |
str_rot13() | Performs the ROT13 encoding on a string |
str_shuffle() | Randomly shuffles all characters in a string |
str_split() | Splits a string into an array |
str_word_count() | Count the number of words in a string |
strcasecmp() | Compares two strings (case-insensitive) |
strchr() | Finds the first occurrence of a string inside another string (alias of strstr()) |
strcmp() | Compares two strings (case-sensitive) |
strcoll() | Compares two strings (locale based string comparison) |
strcspn() | Returns the number of characters found in a string before any part of some specified characters are found |
strip_tags() | Strips HTML and PHP tags from a string |
stripcslashes() | Unquotes a string quoted with addcslashes() |
stripslashes() | Unquotes a string quoted with addslashes() |
stripos() | Returns the position of the first occurrence of a string inside another string (case-insensitive) |
stristr() | Finds the first occurrence of a string inside another string (case-insensitive) |
strlen() | Returns the length of a string |
strnatcasecmp() | Compares two strings using a "natural order" algorithm (case-insensitive) |
strnatcmp() | Compares two strings using a "natural order" algorithm (case-sensitive) |
strncasecmp() | String comparison of the first n characters (case-insensitive) |
strncmp() | String comparison of the first n characters (case-sensitive) |
strpbrk() | Searches a string for any of a set of characters |
strpos() | Returns the position of the first occurrence of a string inside another string (case-sensitive) |
strrchr() | Finds the last occurrence of a string inside another string |
strrev() | Reverses a string |
strripos() | Finds the position of the last occurrence of a string inside another string (case-insensitive) |
strrpos() | Finds the position of the last occurrence of a string inside another string (case-sensitive) |
strspn() | Returns the number of characters found in a string that contains only characters from a specified charlist |
strstr() | Finds the first occurrence of a string inside another string (case-sensitive) |
strtok() | Splits a string into smaller strings |
strtolower() | Converts a string to lowercase letters |
strtoupper() | Converts a string to uppercase letters |
strtr() | Translates certain characters in a string |
substr() | Returns a part of a string |
substr_compare() | Compares two strings from a specified start position (binary safe and optionally case-sensitive) |
substr_count() | Counts the number of times a substring occurs in a string |
substr_replace() | Replaces a part of a string with another string |
trim() | Removes whitespace or other characters from both sides of a string |
ucfirst() | Converts the first character of a string to uppercase |
ucwords() | Converts the first character of each word in a string to uppercase |
vfprintf() | Writes a formatted string to a specified output stream |
vprintf() | Outputs a formatted string |
vsprintf() | Writes a formatted string to a variable |
wordwrap() | Wraps a string to a given number of characters |
Parameter | Description |
---|---|
string | Required. Specifies the string to be escaped |
characters | Required. Specifies the characters or range of characters to be escaped |
Return Value: | Returns the escaped string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to be escaped |
Return Value: | Returns the escaped string |
---|---|
PHP Version: | 4+ |
PHP Changelog: | Prior to PHP 5.4, the PHP dir magic_quotes_gpc was on by default and it ran addslashes() on all GET, POST, and COOKIE data by default. |
Parameter | Description |
---|---|
string | Required. The string to be converted |
Return Value: | Returns the hexadecimal value of the converted string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
charlist | Optional. Specifies which characters to remove from the string.
The following characters are removed if the charlist parameter is empty:
|
Return Value: | Returns the modified string |
---|---|
PHP Version: | 4+ |
Changelog: | The charlist parameter was added in PHP 4.1.0 |
Parameter | Description |
---|---|
ascii | Required. An ASCII value |
Return Value: | Returns the specified character |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to split |
length | Optional. A number that defines the length of the chunks. Default is 76 |
end | Optional. A string that defines what to place at the end of each chunk. Default is \r\n |
Return Value: | Returns the split string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. The string to convert |
from | Required. A character that specifies what Cyrillic character-set to convert from |
to | Required. A character that specifies what Cyrillic character-set to convert to |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. The uuencoded string to decode |
Return Value: | Returns the decoded data as a string |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
string | Required. The string to uuencode |
Return Value: | Returns the uuencoded data |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
string | Required. The string to be checked |
mode | Optional. Specifies the return modes. 0 is default. The different return modes are: |
Return Value: | Depending on the specified mode parameter |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. The string to be calculated |
Return Value: | Returns the crc32 checksum of string as an integer |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
str | Required. Specifies the string to be hashed |
salt | Optional. A salt string to base the hashing on |
Return Value: | Returns the encoded string or a string that is shorter than 13 characters and is guaranteed to differ from the salt on failure |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.6.0 - Shows a E_NOTICE security warning if salt is omitted. PHP 5.3.7 - Added $2x$ and $2y$ Blowfish modes.PHP 5.3.2 - Added SHA-256 and SHA-512. Fixed Blowfish behavior on invalid rounds returns "failure" string ("*0" or "*1"), instead of falling back to DES.PHP 5.3.0 - PHP now contains its own implementation for MD5 crypt, Standard DES, Extended DES and the Blowfish algorithms and will use that if the system lacks of support for one or more of the algorithms. |
Parameter | Description |
---|---|
strings | Required. One or more strings to be sent to the output |
Return Value: | No value is returned |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
separator | Required. Specifies where to break the string |
string | Required. The string to split |
limit | Optional. Specifies the number of array elements to return. Possible values:
|
Return Value: | Returns an array of strings |
---|---|
PHP Version: | 4+ |
Changelog: | The limit parameter was added in PHP 4.0.1, and support for negative limits were added in PHP 5.1.0 |
Parameter | Description |
---|---|
stream | Required. Specifies where to write/output the string |
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
arg1 | Required. The argument to be inserted at the first %-sign in the format string |
arg2 | Optional. The argument to be inserted at the second %-sign in the format string |
arg++ | Optional. The argument to be inserted at the third, fourth, etc. %-sign in the format string |
Return Value: | Returns the length of the written string |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
function | Optional. Specifies which translation table to return.Possible values:
|
flags | Optional. Specifies which quotes the table will contain and which document type the table is for.
The available quote styles are:
|
character-set | Optional. A string that specifies which character-set to use.Allowed values are:
|
Return Value: | Returns the translation table as an array, with the original characters as keys and entities as values |
---|---|
PHP Version: | 4+ |
Changelog: | The default value for the character-set parameter was changed to UTF-8 in PHP 5The additional flags for specifying which doctype the table is for; ENT_HTML401, ENT_HTML5, ENT_XML1 and ENT_XHTML were added in PHP 5.4The character-set parameter was added in PHP 5.3.4 |
Parameter | Description |
---|---|
string | Required. A Hebrew text |
maxcharline | Optional. Specifies maximum characters for each line. hebrev() will avoid breaking words if possible |
Return Value: | Returns the visual string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. A Hebrew text |
maxcharline | Optional. Specifies maximum characters for each line. hebrev() will avoid breaking words if possible |
Return Value: | Returns the visual string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. The hexadecimal value to be converted |
Return Value: | Returns the ASCII character of the converted string, or FALSE on failure |
---|---|
PHP Version: | 5.4.0+ |
Changelog: | PHP 5.5.1 - Throws a warning if the string is invalid hexadecimal string.PHP 5.4.1 - Throws a warning if the string is of odd length. In 5.4.0, the string was silently accepted, but the last byte was removed. |
Parameter | Description |
---|---|
string | Required. Specifies the string to decode |
flags | Optional. Specifies how to handle quotes and which document type to use.
The available quote styles are:
|
character-set | Optional. A string that specifies which character-set to use.Allowed
values are:
|
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4.3.0+ |
Changelog: | PHP 5.6 - Changed the default value for the character-set parameter to the value of the default charset (in configuration).PHP 5.4 - Changed the default value for the character-set parameter to UTF-8. PHP 5.4 - Added ENT_HTML401, ENT_HTML5, ENT_XML1 and ENT_XHTML.PHP 5.0 - Added support for multi-byte encodings |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
flags | Optional. Specifies how to handle quotes, invalid encoding and the used document type.The available quote styles are:
|
character-set | Optional. A string that specifies which character-set to use.Allowed values are:
|
double_encode | Optional. A boolean value that specifies whether to encode existing html entities or not.
|
Return Value: | Returns the converted string. However, if the string parameter contains invalid encoding, it will return an empty string, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.6 - Changed the default value for the character-set parameter to the value of the default charset (in configuration).PHP 5.4 - Changed the default value for the character-set parameter to UTF-8. PHP 5.4 - Added ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_HTML5, ENT_XML1 and ENT_XHTMLPHP 5.3 - Added ENT_IGNORE constant.PHP 5.2.3 - Added the double_encode parameter.PHP 4.1 - Added the character-set parameter. |
Parameter | Description |
---|---|
string | Required. Specifies the string to decode |
flags | Optional. Specifies how to handle quotes and which document type to use.The available quote styles are:
|
Return Value: | Returns the converted string |
---|---|
PHP Version: | 5.1.0+ |
Changelog: | PHP 5.4 - Added ENT_HTML401, ENT_HTML5, ENT_XML1 and ENT_XHTML. |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
flags | Optional. Specifies how to handle quotes, invalid encoding and the used document type.The available quote styles are:
|
character-set | Optional. A string that specifies which character-set to use.Allowed values are:
|
double_encode | Optional. A boolean value that specifies whether to encode existing html entities or not.
|
Return Value: | Returns the converted stringIf the string contains invalid encoding, it will return an empty string, unless either the ENT_IGNORE or ENT_SUBSTITUTE flags are set |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.6 - Changed the default value for the character-set parameter to the value of the default charset (in configuration).PHP 5.4 - Changed the default value for the character-set parameter to UTF-8. PHP 5.4 - Added ENT_SUBSTITUTE, ENT_DISALLOWED, ENT_HTML401, ENT_HTML5, ENT_XML1 and ENT_XHTMLPHP 5.3 - Added ENT_IGNORE constant.PHP 5.2.3 - Added the double_encode parameter.PHP 4.1 - Added the character-set parameter. |
Parameter | Description |
---|---|
separator | Optional. Specifies what to put between the array elements. Default is " (an empty string) |
array | Required. The array to join to a string |
Return Value: | Returns a string from elements of an array |
---|---|
PHP Version: | 4+ |
Changelog: | The separator parameter became optional in PHP 4.3.0 |
Parameter | Description |
---|---|
separator | Optional. Specifies what to put between the array elements. Default is " (an empty string) |
array | Required. The array to join to a string |
Return Value: | Returns a string from elements of an array |
---|---|
PHP Version: | 4+ |
Changelog: | The separator parameter became optional in PHP 4.3.0. |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 5.3.0+ |
Parameter | Description |
---|---|
string1 | Required. First string to compare |
string2 | Required. Second string to compare |
insert | Optional. The cost of inserting a character. Default is 1 |
replace | Optional. The cost of replacing a character. Default is 1 |
delete | Optional. The cost of deleting a character. Default is 1 |
Return Value: | Returns the Levenshtein distance between the two argument strings or -1, if one of the strings exceeds 255 characters |
---|---|
PHP Version: | 4.0.1+ |
Return Value: | Returns data based upon the current locale as set by setlocale() |
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
charlist | Optional. Specifies which characters to remove from the string. If omitted, all of the following characters are removed:
|
Return Value: | Returns the modified string |
---|---|
PHP Version: | 4+ |
Changelog: | The charlist parameter was added in PHP 4.1 |
Parameter | Description |
---|---|
string | Required. The string to be calculated |
raw | Optional. Specifies hex or binary output format:
|
Return Value: | Returns the calculated MD5 hash on success, or FALSE on failure |
---|---|
PHP Version: | 4+ |
Changelog: | The raw parameter became optional in PHP 5.0 |
Parameter | Description |
---|---|
file | Required. The file to be calculated |
raw | Optional. A boolean value that specifies hex or binary output format:
|
Return Value: | Returns the calculated MD5 hash on success, or FALSE on failure |
---|---|
PHP Version: | 4.2.0+ |
Changelog: | The raw parameter was added in PHP 5.0As of PHP 5.1, it is possible to use md5_file() with wrappers, e.g. md5_file("https://w3schools.com/..") |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
length | Optional. Specifies the maximum length of the metaphone key |
Return Value: | Returns the metaphone key of the string on success, or FALSE on failure. |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to be formatted and how to format the variables in it.Possible format values:
Padding and Flags:
|
number | Required. The number to be inserted at the %-sign in the format string |
Return Value: | Returns the formatted string. Characters before and after the formatting string will be returned unchanged. Non-numeric number causes returning NULL and emitting E_WARNING |
---|---|
PHP Version: | 4.3.0+ |
Parameter | Description |
---|---|
element | Required. Specifies which element to return. Must be one of the following elements:Time and Calendar:
|
Return Value: | Returns the specific information on success, or FALSE on failure. |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
xhtml | Optional. A boolean value that indicates whether or not to use XHTML compatible line breaks:
|
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4+ |
Changelog: | The xhtml parameter was added in PHP 5.3.Before PHP 4.0.5, it inserted <br>. After PHP 4.0.5 it inserts <br />. |
Parameter | Description |
---|---|
number | Required. The number to be formatted. If no other parameters are set, the number will be formatted without decimals and with comma (,) as the thousands separator. |
decimals | Optional. Specifies how many decimals. If this parameter is set, the number will be formatted with a dot (.) as decimal point |
decimalpoint | Optional. Specifies what string to use for decimal point |
separator | Optional. Specifies what string to use for thousands separator. Only the first character of separator is used. For example, "xxx" will give the same output as "x" Note: If this parameter is given, all other parameters are required as well |
Return Value: | Returns the formatted number |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 5.4, this function supports multiple bytes in the parameters decimalpoint and separator. Only the first byte of each separator was used in older versions. |
Parameter | Description |
---|---|
string | Required. The string to get an ASCII value from |
Return Value: | Returns the ASCII value as an integer |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to parse |
array | Optional (Required from PHP 7.2). Specifies the name of an array to store the variables. This parameter indicates that the variables will be stored in an array. |
Return Value: | No value is returned |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.2.0 - The array parameter is required.PHP 4.0.3 - Added the array parameter. |
Parameter | Description |
---|---|
strings | Required. One or more strings to be sent to the output |
Return Value: | Always returns 1 |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
arg1 | Required. The argument to be inserted at the first %-sign in the format string |
arg2 | Optional. The argument to be inserted at the second %-sign in the format string |
arg++ | Optional. The argument to be inserted at the third, fourth, etc. %-sign in the format string |
Return Value: | Returns the length of the outputted string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the quoted-printable string to be decoded |
Return Value: | Returns the 8-bit ASCII string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the 8-bit string to be converted |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 5.3.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns the string with meta characters quoted |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
charlist | Optional. Specifies which characters to remove from the string. If omitted, all of the following characters are removed:
|
Return Value: | Returns the modified string |
---|---|
PHP Version: | 4+ |
Changelog: | The charlist parameter was added in PHP 4.1 |
Parameter | Description |
---|---|
constant | Required. Specifies what locale information should be set.
Available constants:
|
location | Required. Specifies what country/region to set the locale information to. Can be a string or an array. It is possible to pass multiple locations.If the location is NULL or the empty string ", the location names will be set from the values of environment variables with the same names as the constants above, or from "LANG".If the location is "0", the location setting is not affected, only the current setting is returned.If the location is an array, setlocale() will try each array element until it finds a valid language or region code. This is very useful if a region is known under different names on different systems.Note: To view all available language codes, go to our Language code reference. |
Return Value: | Returns the current locale settings, or FALSE on failure. The return value depends on the system that PHP is running. |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.3.0 - If a string is passed to the constant parameter instead of one of the LC_ constants, this function throws an E_DREPRECATED notice. |
Parameter | Description |
---|---|
string | Required. The string to be calculated |
raw | Optional. Specify hex or binary output format:
|
Return Value: | Returns the calculated SHA-1 hash on success, or FALSE on failure |
---|---|
PHP Version: | 4.3.0+ |
Parameter | Description |
---|---|
file | Required. The file to be calculated |
raw | Optional. A boolean value that specifies hex or binary output format:
|
Return Value: | Returns the calculated SHA-1 hash on success, or FALSE on failure |
---|---|
PHP Version: | 4.3.0+ |
Changelog: | As of PHP 5.1, it is possible to use sha1_file() with wrappers, e.g. sha1_file("https://w3schools.com/..") |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to be compared |
string2 | Required. Specifies the second string to be compared |
percent | Optional. Specifies a variable name for storing the similarity in percent |
Return Value: | Returns the number of matching characters of two strings |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns the soundex key of the string on success, or FALSE on failure. |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
arg1 | Required. The argument to be inserted at the first %-sign in the format string |
arg2 | Optional. The argument to be inserted at the second %-sign in the format string |
arg++ | Optional. The argument to be inserted at the third, fourth, etc. %-sign in the format string |
Return Value: | Returns the formatted string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to read |
format | Required. Specifies the format to use.Possible format values:
|
arg1 | Optional. The first variable to store data in |
arg2 | Optional. The second variable to store data in |
arg++ | Optional. The third, fourth, and so on, to store data in |
Return Value: | If only two parameters are passed to this function, the data will be returned as an array. Otherwise, if optional parameters are passed, the data parsed are stored in them. If there are more specifiers than variables to contain them, an error occurs. However, if there are less specifiers than variables, the extra variables contain NULL. |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to parse |
separator | Optional. A character that specifies the field separator. Default is comma ( , ) |
enclosure | Optional. A character that specifies the field enclosure character. Default is " |
escape | Optional. A character that specifies the escape character. Default is backslash (\) |
Return Value: | Returns the CSV fields in an array |
---|---|
PHP Version: | 5.3.0+ |
Parameter | Description |
---|---|
find | Required. Specifies the value to find |
replace | Required. Specifies the value to replace the value in find |
string | Required. Specifies the string to be searched |
count | Optional. A variable that counts the number of replacements |
Return Value: | Returns a string or an array with the replaced values |
---|---|
PHP Version: | 5+ |
Changelog: | The count parameter was added in PHP 5.0 |
Parameter | Description |
---|---|
string | Required. Specifies the string to pad |
length | Required. Specifies the new string length. If this value is less than the original length of the string, nothing will be done |
pad_string | Optional. Specifies the string to use for padding. Default is whitespace |
pad_type | Optional. Specifies what side to pad the string.Possible values:
|
Return Value: | Returns the padded string |
---|---|
PHP Version: | 4.0.1+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to repeat |
repeat | Required. Specifies the number of times the string will be repeated. Must be greater or equal to 0 |
Return Value: | Returns the repeated string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
find | Required. Specifies the value to find |
replace | Required. Specifies the value to replace the value in find |
string | Required. Specifies the string to be searched |
count | Optional. A variable that counts the number of replacements |
Return Value: | Returns a string or an array with the replaced values |
---|---|
PHP Version: | 4+ |
Changelog: | The count parameter was added in PHP 5.0Before PHP 4.3.3, this function experienced trouble when using arrays as both find and replace parameters, which caused empty find indexes to be skipped without advancing the internal pointer on the replace array. Newer versions will not have this problem.As of PHP 4.0.5, most of the parameters can now be an array |
Parameter | Description |
---|---|
string | Required. Specifies the string to encode |
Return Value: | Returns the ROT13 version of the encoded string |
---|---|
PHP Version: | 4.2.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to shuffle |
Return Value: | Returns the shuffled string |
---|---|
PHP Version: | 4.3.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to split |
length | Optional. Specifies the length of each array element. Default is 1 |
Return Value: | If length is less than 1, the str_split() function will return FALSE. If length is larger than the length of string, the entire string will be returned as the only element of the array. |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
return | Optional. Specifies the return value of the str_word_count() function.Possible values:
|
char | Optional. Specifies special characters to be considered as words. |
Return Value: | Returns a number or an array, depending on the chosen return parameter |
---|---|
PHP Version: | 4.3.0+ |
Changelog: | The char parameter was added in PHP 5.1 |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
search | Required. Specifies the string to search for. If this parameter is a number, it will search for the character matching the ASCII value of the number |
before_search | Optional. A boolean value whose default is "false". If set to "true", it returns the part of the string before the first occurrence of the search parameter. |
Return Value: | Returns the rest of the string (from the matching point), or FALSE, if the string to search for is not found. |
---|---|
PHP Version: | 4+ |
Changelog: | The before_search parameter was added in PHP 5.3 |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
Return Value: |
This function returns:
|
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
char | Required. Specifies the characters to search for |
start | Optional. Specifies where in string to start |
length | Optional. Specifies the length of the string (how much of the string to search) |
Return Value: | Returns the number of characters found in a string before any part of the specified characters are found |
---|---|
PHP Version: | 4+ |
Changelog: | The start and length parameters were added in PHP 4.3 |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
allow | Optional. Specifies allowable tags. These tags will not be removed |
Return Value: | Returns the stripped string |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 5.3.4, this function ignores self-closing XHTML tags (like <br />) in allow parameterAs of PHP 5.0, this function is binary-safe.As of PHP 4.3, HTML comments are always stripped. |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns the unescaped string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns a string with backslashes stripped off |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
find | Required. Specifies the string to find |
start | Optional. Specifies where to begin the search |
Return Value: | Returns the position of the first occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1. |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
search | Required. Specifies the string to search for. If this parameter is a number, it will search for the character matching the ASCII value of the number |
before_search | Optional. A boolean value whose default is "false". If set to "true", it returns the part of the string before the first occurrence of the search parameter. |
Return Value: | Returns the rest of the string (from the matching point), or FALSE, if the string to search for is not found. |
---|---|
PHP Version: | 4+ |
Changelog: | The before_search parameter was added in PHP 5.3.This function was made binary-safe in PHP 4.3 |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
Return Value: | Returns the length of a string (in bytes) on success, and 0 if the string is empty |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
length | Required. Specify the number of characters from each string to be used in the comparison |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4.0.2+ |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
length | Required. Specify the number of characters from each string to be used in the comparison |
Return Value: | This function returns:
|
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
charlist | Required. Specifies the characters to find |
Return Value: | Returns the string starting from the character found, otherwise it returns FALSE |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
find | Required. Specifies the string to find |
start | Optional. Specifies where to begin the search. If start is a negative number, it counts from the end of the string. |
Return Value: | Returns the position of the first occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1. |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.1.0 - The start parameter can be a negative number |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
char | Required. Specifies the string to find. If this is a number, it will search for the character matching the ASCII value of that number |
Return Value: | Returns all characters from the last occurrence of a string within another string, to the end of the main string, or FALSE if the character is not found |
---|---|
PHP Version: | 4+ |
Changelog: | This function was made binary-safe in PHP 4.3 |
Parameter | Description |
---|---|
string | Required. Specifies the string to reverse |
Return Value: | Returns the reversed string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
find | Required. Specifies the string to find |
start | Optional. Specifies where to begin the search |
Return Value: | Returns the position of the last occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1. |
---|---|
PHP Version: | 5+ |
Changelog: | As of PHP 5.0, the find parameter may now be a string of more than one character.The start parameter was added in PHP 5.0 |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
find | Required. Specifies the string to find |
start | Optional. Specifies where to begin the search |
Return Value: | Returns the position of the last occurrence of a string inside another string, or FALSE if the string is not found. Note: String positions start at 0, and not 1. |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 5.0, the find parameter may now be a string of more than one characterThe start parameter was added in PHP 5.0 |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
charlist | Required. Specifies the characters to find |
start | Optional. Specifies where in the string to start |
length | Optional. Defines the length of the string |
Return Value: | Returns the number of characters found in the string that contains only characters from the charlist parameter. |
---|---|
PHP Version: | 4+ |
Changelog: | The start and length parameters were added in PHP 4.3. |
Parameter | Description |
---|---|
string | Required. Specifies the string to search |
search | Required. Specifies the string to search for. If this parameter is a number, it will search for the character matching the ASCII value of the number |
before_search | Optional. A boolean value whose default is "false". If set to "true", it returns the part of the string before the first occurrence of the search parameter. |
Return Value: | Returns the rest of the string (from the matching point), or FALSE, if the string to search for is not found. |
---|---|
PHP Version: | 4+ |
Changelog: | The before_search parameter was added in PHP 5.3 |
Parameter | Description |
---|---|
string | Required. Specifies the string to split |
split | Required. Specifies one or more split characters |
Return Value: | Returns a string token |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
Return Value: | Returns the the lowercased string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
Return Value: | Returns the the uppercased string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to translate |
from | Required (unless array is used). Specifies what characters to change |
to | Required (unless array is used). Specifies what characters to change into |
array | Required (unless to and from is used). An array containing what to change from as key, and what to change to as value |
Return Value: | Returns the translated string. If the array parameter contains a key which is an empty string ("), it will return FALSE. |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to return a part of |
start | Required. Specifies where to start in the string
|
length | Optional. Specifies the length of the returned string. Default is to the end of the string.
|
Return Value: | Returns the extracted part of a string, or FALSE on failure, or an empty string |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.0 - If string = start (in characters long), it will return an empty string. Earlier versions returns FALSE.PHP 5.2.2 - 5.2.6 - If start has the position of a negative truncation, FALSE is returned. Other versions get the string from start. |
Parameter | Description |
---|---|
string1 | Required. Specifies the first string to compare |
string2 | Required. Specifies the second string to compare |
startpos | Required. Specifies where to start comparing in string1. If negative, it starts counting from the end of the string |
length | Optional. Specifies how much of string1 to compare |
case | Optional. A boolean value that specifies whether or not to perform a case-sensitive compare:
|
Return Value: | This function returns:
|
---|---|
PHP Version: | 5+ |
Changelog: | As of PHP 5.5.11 - The length parameter can be 0.As of PHP 5.1, it is now possible to use a negative startpos. |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
substring | Required. Specifies the string to search for |
start | Optional. Specifies where in string to start searching. If negative, it starts counting from the end of the string |
length | Optional. Specifies the length of the search |
Return Value: | Returns the the number of times the substring occurs in the string |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 7.1 - The length parameters can be 0 or a negative number. PHP 7.1 - The start parameters can be a negative number.PHP 5.1 - The start and length parameters were added. |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
replacement | Required. Specifies the string to insert |
start | Required. Specifies where to start replacing in the string
|
length | Optional. Specifies how many characters should be replaced. Default is the same length as the string.
|
Return Value: | Returns the replaced string. If the string is an array then the array is returned |
---|---|
PHP Version: | 4+ |
Changelog: | As of PHP 4.3.3, all parameters now accept arrays |
Parameter | Description |
---|---|
string | Required. Specifies the string to check |
charlist | Optional. Specifies which characters to remove from the string. If omitted, all of the following characters are removed:
|
Return Value: | Returns the modified string |
---|---|
PHP Version: | 4+ |
Changelog: | The charlist parameter was added in PHP 4.1 |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to convert |
delimiters | Optional. Specifies the word separator character |
Return Value: | Returns the converted string |
---|---|
PHP Version: | 4+ |
Changelog: | PHP 5.4 - Added the delimiters parameter |
Parameter | Description |
---|---|
stream | Required. Specifies where to write/output the string |
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
argarray | Required. An array with arguments to be inserted at the % signs in the format string |
Return Value: | Returns the length of the written string |
---|---|
PHP Version: | 5+ |
Parameter | Description |
---|---|
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
argarray | Required. An array with arguments to be inserted at the % signs in the format string |
Return Value: | Returns the length of the outputted string |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
format | Required. Specifies the string and how to format the variables in it.Possible format values:
|
argarray | Required. An array with arguments to be inserted at the % signs in the format string |
Return Value: | Returns array values as a formatted string |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the string to break up into lines |
width | Optional. Specifies the maximum line width. Default is 75 |
break | Optional. Specifies the characters to use as break. Default is "\n" |
cut |
Optional. Specifies whether words longer than the specified width should be wrapped:
|
Return Value: | Returns the string broken into lines on success, or FALSE on failure. |
---|---|
PHP Version: | 4.0.2+ |
Changelog: | The cut parameter was added in PHP 4.0.3 |
Function | Description |
---|---|
boolval() | Returns the boolean value of a variable |
debug_zval_dump() | Dumps a string representation of an internal zend value to output |
doubleval() | Alias of floatval() |
empty() | Checks whether a variable is empty |
floatval() | Returns the float value of a variable |
get_defined_vars() | Returns all defined variables, as an array |
get_resource_type() | Returns the type of a resource |
gettype() | Returns the type of a variable |
intval() | Returns the integer value of a variable |
is_array() | Checks whether a variable is an array |
is_bool() | Checks whether a variable is a boolean |
is_callable() | Checks whether the contents of a variable can be called as a function |
is_countable() | Checks whether the contents of a variable is a countable value |
is_double() | Alias of is_float() |
is_float() | Checks whether a variable is of type float |
is_int() | Checks whether a variable is of type integer |
is_integer() | Alias of is_int() |
is_iterable() | Checks whether the contents of a variable is an iterable value |
is_long() | Alias of is_int() |
is_null() | Checks whether a variable is NULL |
is_numeric() | Checks whether a variable is a number or a numeric string |
is_object() | Checks whether a variable is an object |
is_real() | Alias of is_float() |
is_resource() | Checks whether a variable is a resource |
is_scalar() | Checks whether a variable is a scalar |
is_string() | Checks whether a variable is of type string |
isset() | Checks whether a variable is set (declared and not NULL) |
print_r() | Prints the information about a variable in a human-readable way |
serialize() | Converts a storable representation of a value |
settype() | Converts a variable to a specific type |
strval() | Returns the string value of a variable |
unserialize() | Converts serialized data back into actual data |
unset() | Unsets a variable |
var_dump() | Dumps information about one or more variables |
var_export() | Returns structured information (valid PHP code) about a variable |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check. Must be a scalar type |
Return Value: | The boolean value of the variable |
---|---|
Return Type: | Boolean |
PHP Version: | 5.5+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to be evaluated |
Return Value: | Nothing |
---|---|
Return Type: | - |
PHP Version: | 4.2+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check. Must be a scalar type |
Return Value: | The float value of the variable on success, 0 on failure. An empty array will return 0, and a non-empty array will return 1 |
---|---|
Return Type: | Float |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is countable, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 7.3+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | FALSE if variable exists and is not empty, TRUE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.5: Support for expressions, not only variablesPHP 5.4: Non-numeric offsets of strings returns TRUE |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check. Must be a scalar type |
Return Value: | The float value of the variable on success, 0 on failure. An empty array will return 0, and a non-empty array will return 1 |
---|---|
Return Type: | Float |
PHP Version: | 4.2+ |
Return Value: | All the defined variables as a multidimensional array |
---|---|
Return Type: | Array |
PHP Version: | 4.0.4+ |
Parameter | Description |
---|---|
resource | Required. Specifies the resource to check |
Return Value: | The type as a string on success, if type is not identified it returns "unknown", if resource is not a resource it returns NULL and generates an error |
---|---|
Return Type: | String |
PHP Version: | 4.0.2+ |
PHP Changelog: | PHP 5.3: If resource is not a resource it returns NULL. Earlier, the returned value was FALSE |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | The type as a string. Can be one of the following values: "boolean", "integer", "double", "string", "array", "object", "resource", "NULL", "unknown type" |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.2: Closed resources are now returned as "resource (closed)". Earlier, the returned value was "unknown type". |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
base | Optional. Specifies the base to use for the conversion. Only has effect if variable is a string. Default base is 10 |
Return Value: | The integer value of the variable on success, 0 on failure. An empty array will return 0, and a non-empty array will return 1 |
---|---|
Return Type: | Integer |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.1: When an object is passed to variable, it throws E_NOTICE and returns 1 |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is an array, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a boolean, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
syntax_only | Optional. If set to TRUE, the function only verifies if variable is a function or method. It will reject variables that are not strings, or arrays without a valid structure to be used as a callback. Default is false |
name | Optional. Returns a "callable name" (only for classes) |
Return Value: | TRUE if variable is callable, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0.6+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a float, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a float, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is an integer, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is an integer, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is iterable, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 7.1+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is an integer, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is NULL, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0.4+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a number or a numeric string, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is an object, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.2: This function now returns true for unserialized objects without a class definition. Earlier false was returned |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a float, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a resource, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a scalar, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | TRUE if variable is a string, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
... | Optional. Another variable to check |
Return Value: | TRUE if variable exists and is not NULL, FALSE otherwise |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 5.4: Non-numeric offsets of strings now returns FALSE |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to return information about |
return | Optional. When set to true, this function will return the information (not print it). Default is false |
Return Value: | If variable is integer, float, or string, the value itself will be printed. If variable is array or object, this function returns keys and elements. If the return parameter is set to TRUE, this function returns a string |
---|---|
Return Type: | True or String |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
value | Required. Specifies the value to be serialized |
Return Value: | A string that contains a byte-stream representation of value. The string can be stored anywhere |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to convert |
type | Required. Specifies the type to convert variable to. The possible types are: boolean, bool, integer, int, float, double, string, array, object, null |
Return Value: | TRUE on success, FALSE on failure |
---|---|
Return Type: | Boolean |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
Return Value: | The string value of the variable on success |
---|---|
Return Type: | String |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the serialized string |
options | Optional. Specifies options to be provided to the function, as an associative array. Can be either an array of class names which should be accepted, false to accept no classes, or true to accept all classes. True is default. |
Return Value: | The converted value. Can be a boolean, integer, float, string, array or object. FALSE, and an E_NOTICE on failure |
---|---|
Return Type: | Boolean, integer, float, string, array or object |
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.0: Added the options parameter |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to unset |
... | Optional. Another variable to unset |
Return Value: | None |
---|---|
Return Type: | None |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
var1, var2, ... | Required. Specifies the variable(s) to dump information from |
Return Value: | Nothing |
---|---|
Return Type: | - |
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
variable | Required. Specifies the variable to check |
return | Optional. If set to true, it returns the variable representation instead of outputting it |
Return Value: | If return is set to TRUE, it returns the variable representation. Otherwise, it returns NULL |
---|---|
Return Type: | Mixed |
PHP Version: | 4.2+ |
Function | Description |
---|---|
utf8_decode() | Decodes an UTF-8 string to ISO-8859-1 |
utf8_encode() | Encodes an ISO-8859-1 string to UTF-8 |
xml_error_string() | Returns an error string from the XML parser |
xml_get_current_byte_index() | Returns the current byte index from the XML parser |
xml_get_current_column_number() | Returns the current column number from the XML parser |
xml_get_current_line_number() | Returns the current line number from the XML parser |
xml_get_error_code() | Returns an error code from the XML parser |
xml_parse() | Parses an XML document |
xml_parse_into_struct() | Parses XML data into an array |
xml_parser_create_ns() | Creates an XML parser with namespace support |
xml_parser_create() | Creates an XML parser |
xml_parser_free() | Frees an XML parser |
xml_parser_get_option() | Returns options from an XML parser |
xml_parser_set_option() | Sets options in an XML parser |
xml_set_character_data_handler() | Sets up the character data handler for the XML parser |
xml_set_default_handler() | Sets up the default data handler for the XML parser |
xml_set_element_handler() | Sets up start and end element handlers for the XML parser |
xml_set_end_namespace_decl_handler() | Sets up the end namespace declaration handler |
xml_set_external_entity_ref_handler() | Sets up the external entity reference handler for the XML parser |
xml_set_notation_decl_handler() | Sets up notation declaration handler for the XML parser |
xml_set_object() | Allows to use XML parser within an object |
xml_set_processing_instruction_handler() | Sets up processing instruction handler |
xml_set_start_namespace_decl_handler() | Sets up the start namespace declaration handler |
xml_set_unparsed_entity_decl_handler() | Sets handler function for unparsed entity declarations |
Constant |
---|
XML_ERROR_NONE (integer) |
XML_ERROR_NO_MEMORY (integer) |
XML_ERROR_SYNTAX (integer) |
XML_ERROR_NO_ELEMENTS (integer) |
XML_ERROR_INVALID_TOKEN (integer) |
XML_ERROR_UNCLOSED_TOKEN (integer) |
XML_ERROR_PARTIAL_CHAR (integer) |
XML_ERROR_TAG_MISMATCH (integer) |
XML_ERROR_DUPLICATE_ATTRIBUTE (integer) |
XML_ERROR_JUNK_AFTER_DOC_ELEMENT (integer) |
XML_ERROR_PARAM_ENTITY_REF (integer) |
XML_ERROR_UNDEFINED_ENTITY (integer) |
XML_ERROR_RECURSIVE_ENTITY_REF (integer) |
XML_ERROR_ASYNC_ENTITY (integer) |
XML_ERROR_BAD_CHAR_REF (integer) |
XML_ERROR_BINARY_ENTITY_REF (integer) |
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF (integer) |
XML_ERROR_MISPLACED_XML_PI (integer) |
XML_ERROR_UNKNOWN_ENCODING (integer) |
XML_ERROR_INCORRECT_ENCODING (integer) |
XML_ERROR_UNCLOSED_CDATA_SECTION (integer) |
XML_ERROR_EXTERNAL_ENTITY_HANDLING (integer) |
XML_OPTION_CASE_FOLDING (integer) |
XML_OPTION_TARGET_ENCODING (integer) |
XML_OPTION_SKIP_TAGSTART (integer) |
XML_OPTION_SKIP_WHITE (integer) |
XML_SAX_IMPL (string) |
Parameter | Description |
---|---|
string | Required. Specifies a UTF-8 encoded string to decode |
Return Value: | The decoded string on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
string | Required. Specifies the ISO-8859-1 string to encode |
Return Value: | The encoded string on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
code | Required. Specifies an error code from the xml_get_error_code() function |
Return Value: | The error description on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
Return Value: | The current byte index on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
Return Value: | The current column number on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
Return Value: | The current line number on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
Return Value: | The error code on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
data | Required. Specifies the data to parse |
end | Optional. If set to TRUE, the data in the data parameter is the last piece of data sent in this parse. Note: Entity errors are reported at the end of the parse - and will only show if the end parameter is TRUE |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
data | Required. Specifies the XML data to parse |
values | Required. Specifies an array with the values of the XML data |
index | Optional. Specifies an array with pointers to the location of the values in values |
Return Value: | 1 on success. 0 on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
encoding | Optional. Specifies the character encoding for input/output in PHP 4. From PHP 5 it specifies the character encoding only for output. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1. From PHP 5.0.2, the default output charset is UTF-8. The possible values are ISO-8859-1, UTF-8 and US-ASCII |
separator | Optional. Specifies the output separator for tag name and namespace. Default is " : " |
Return Value: | A resource handle to be used by other XML functions on success. FALSE on failure |
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
encoding | Optional. Specifies the character encoding for input/output in PHP 4. From PHP 5 it specifies the character encoding only for output. In PHP 5.0.0 and 5.0.1, the default output charset is ISO-8859-1. From PHP 5.0.2, the default output charset is UTF-8 |
Return Value: | A resource handle to be used by other XML functions on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to free |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
option | Required. Specifies the option to get. Possible values:
|
Return Value: | The option's value on success. FALSE and an error on failure |
---|---|
PHP Version: | 4.0+ |
PHP Changelog: | PHP 7.1: Added XML_OPTION_SKIP_TAGSTART and XML_OPTION_SKIP_WHITE to the option parameter |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
option | Required. Specifies the option to set. Possible values:
|
value | Required. Specifies options new value |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must have two parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must have two parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
start | Required. Specifies a function to be called at the start of an element. The function must have three parameters:
|
end | Required. Specifies a function to be called at the end of an element.
The function must have two parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must have two parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must
accept five parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must
accept five parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
object | Required. Specifies the object where to use the XML parser |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must
accept three parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be used as an event handler. The function must have three parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0.5+ |
Parameter | Description |
---|---|
parser | Required. Specifies the XML parser to use |
handler | Required. Specifies a function to be called if the XML parser encounters
an external entity declaration with an NDATA declaration. The function must
accept six parameters:
|
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.0+ |
Function | Description |
---|---|
zip_close() | Closes a ZIP file archive |
zip_entry_close() | Closes a ZIP directory entry |
zip_entry_compressedsize() | Returns the compressed file size of a ZIP directory entry |
zip_entry_compressionmethod() | Returns the compression method of a ZIP directory entry |
zip_entry_filesize() | Returns the actual file size of a ZIP directory entry |
zip_entry_name() | Returns the name of a ZIP directory entry |
zip_entry_open() | Opens a directory entry in a ZIP file for reading |
zip_entry_read() | Reads from an open directory entry in the ZIP file |
zip_open() | Opens a ZIP file archive |
zip_read() | Reads the next file in a open ZIP file archive |
Parameter | Description |
---|---|
zip | Required. Specifies the ZIP file to close (opened with zip_open() ) |
Return Value: | Nothing |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the ZIP directory entry returned by zip_read() |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the ZIP directory entry returned by zip_read() |
Return Value: | The compressed size |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the ZIP directory entry returned by zip_read() |
Return Value: | The compression method |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the ZIP directory entry returned by zip_read() |
Return Value: | The size of the directory entry |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the zip directory entry returned by zip_read() |
Return Value: | The name of the directory entry |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip | Required. Specifies the ZIP resource opened with zip_open() |
zip_entry | Required. Specifies the ZIP directory entry to open (opened with zip_read()) |
mode | Optional. Specifies the type of access you require to the ZIP archive. Note: Currently, mode is always "rb", because ZIP support in PHP is read only |
Return Value: | TRUE on success. FALSE on failure |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip_entry | Required. Specifies the directory entry returned by zip_read() |
length | Optional. Specifies the number of (uncompressed) bytes to return. Default is 1024 |
Return Value: | The data read or " on end of file. FALSE on failure |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip | Required. Specifies the ZIP file to open |
Return Value: | A resource handle on success. FALSE on failure |
---|---|
PHP Version: | 4.1.0+ |
Parameter | Description |
---|---|
zip | Required. Specifies a ZIP file opened with zip_open() |
Return Value: | A resource containing a file within the ZIP archive on success. FALSE if there is no more entries to read or on failure |
---|---|
PHP Version: | 4.1.0+ |
Africa/Abidjan | Africa/Accra | Africa/Addis_Ababa | Africa/Algiers | Africa/Asmara |
Africa/Asmera | Africa/Bamako | Africa/Bangui | Africa/Banjul | Africa/Bissau |
Africa/Blantyre | Africa/Brazzaville | Africa/Bujumbura | Africa/Cairo | Africa/Casablanca |
Africa/Ceuta | Africa/Conakry | Africa/Dakar | Africa/Dar_es_Salaam | Africa/Djibouti |
Africa/Douala | Africa/El_Aaiun | Africa/Freetown | Africa/Gaborone | Africa/Harare |
Africa/Johannesburg | Africa/Juba | Africa/Kampala | Africa/Khartoum | Africa/Kigali |
Africa/Kinshasa | Africa/Lagos | Africa/Libreville | Africa/Lome | Africa/Luanda |
Africa/Lubumbashi | Africa/Lusaka | Africa/Malabo | Africa/Maputo | Africa/Maseru |
Africa/Mbabane | Africa/Mogadishu | Africa/Monrovia | Africa/Nairobi | Africa/Ndjamena |
Africa/Niamey | Africa/Nouakchott | Africa/Ouagadougou | Africa/Porto-Novo | Africa/Sao_Tome |
Africa/Timbuktu | Africa/Tripoli | Africa/Tunis | Africa/Windhoek |
America/Adak | America/Anchorage | America/Anguilla |
America/Antigua | America/Araguaina | America/Argentina/Buenos_Aires |
America/Argentina/Catamarca | America/Argentina/ComodRivadavia | America/Argentina/Cordoba |
America/Argentina/Jujuy | America/Argentina/La_Rioja | America/Argentina/Mendoza |
America/Argentina/Rio_Gallegos | America/Argentina/Salta | America/Argentina/San_Juan |
America/Argentina/San_Luis | America/Argentina/Tucuman | America/Argentina/Ushuaia |
America/Aruba | America/Asuncion | America/Atikokan |
America/Atka | America/Bahia | America/Bahia_Banderas |
America/Barbados | America/Belem | America/Belize |
America/Blanc-Sablon | America/Boa_Vista | America/Bogota |
America/Boise | America/Buenos_Aires | America/Cambridge_Bay |
America/Campo_Grande | America/Cancun | America/Caracas |
America/Catamarca | America/Cayenne | America/Cayman |
America/Chicago | America/Chihuahua | America/Coral_Harbour |
America/Cordoba | America/Costa_Rica | America/Creston |
America/Cuiaba | America/Curacao | America/Danmarkshavn |
America/Dawson | America/Dawson_Creek | America/Denver |
America/Detroit | America/Dominica | America/Edmonton |
America/Eirunepe | America/El_Salvador | America/Ensenada |
America/Fort_Wayne | America/Fortaleza | America/Glace_Bay |
America/Godthab | America/Goose_Bay | America/Grand_Turk |
America/Grenada | America/Guadeloupe | America/Guatemala |
America/Guayaquil | America/Guyana | America/Halifax |
America/Havana | America/Hermosillo | America/Indiana/Indianapolis |
America/Indiana/Knox | America/Indiana/Marengo | America/Indiana/Petersburg |
America/Indiana/Tell_City | America/Indiana/Vevay | America/Indiana/Vincennes |
America/Indiana/Winamac | America/Indianapolis | America/Inuvik |
America/Iqaluit | America/Jamaica | America/Jujuy |
America/Juneau | America/Kentucky/Louisville | America/Kentucky/Monticello |
America/Knox_IN | America/Kralendijk | America/La_Paz |
America/Lima | America/Los_Angeles | America/Louisville |
America/Lower_Princes | America/Maceio | America/Managua |
America/Manaus | America/Marigot | America/Martinique |
America/Matamoros | America/Mazatlan | America/Mendoza |
America/Menominee | America/Merida | America/Metlakatla |
America/Mexico_City | America/Miquelon | America/Moncton |
America/Monterrey | America/Montevideo | America/Montreal |
America/Montserrat | America/Nassau | America/New_York |
America/Nipigon | America/Nome | America/Noronha |
America/North_Dakota/Beulah | America/North_Dakota/Center | America/North_Dakota/New_Salem |
America/Ojinaga | America/Panama | America/Pangnirtung |
America/Paramaribo | America/Phoenix | America/Port-au-Prince |
America/Port_of_Spain | America/Porto_Acre | America/Porto_Velho |
America/Puerto_Rico | America/Rainy_River | America/Rankin_Inlet |
America/Recife | America/Regina | America/Resolute |
America/Rio_Branco | America/Rosario | America/Santa_Isabel |
America/Santarem | America/Santiago | America/Santo_Domingo |
America/Sao_Paulo | America/Scoresbysund | America/Shiprock |
America/Sitka | America/St_Barthelemy | America/St_Johns |
America/St_Kitts | America/St_Lucia | America/St_Thomas |
America/St_Vincent | America/Swift_Current | America/Tegucigalpa |
America/Thule | America/Thunder_Bay | America/Tijuana |
America/Toronto | America/Tortola | America/Vancouver |
America/Virgin | America/Whitehorse | America/Winnipeg |
America/Yakutat | America/Yellowknife |
Antarctica/Casey | Antarctica/Davis | Antarctica/DumontDUrville | Antarctica/Macquarie | Antarctica/Mawson |
Antarctica/McMurdo | Antarctica/Palmer | Antarctica/Rothera | Antarctica/South_Pole | Antarctica/Syowa |
Antarctica/Vostok |
Arctic/Longyearbyen |
Asia/Aden | Asia/Almaty | Asia/Amman | Asia/Anadyr | Asia/Aqtau |
Asia/Aqtobe | Asia/Ashgabat | Asia/Ashkhabad | Asia/Baghdad | Asia/Bahrain |
Asia/Baku | Asia/Bangkok | Asia/Beirut | Asia/Bishkek | Asia/Brunei |
Asia/Calcutta | Asia/Choibalsan | Asia/Chongqing | Asia/Chungking | Asia/Colombo |
Asia/Dacca | Asia/Damascus | Asia/Dhaka | Asia/Dili | Asia/Dubai |
Asia/Dushanbe | Asia/Gaza | Asia/Harbin | Asia/Hebron | Asia/Ho_Chi_Minh |
Asia/Hong_Kong | Asia/Hovd | Asia/Irkutsk | Asia/Istanbul | Asia/Jakarta |
Asia/Jayapura | Asia/Jerusalem | Asia/Kabul | Asia/Kamchatka | Asia/Karachi |
Asia/Kashgar | Asia/Kathmandu | Asia/Katmandu | Asia/Khandyga | Asia/Kolkata |
Asia/Krasnoyarsk | Asia/Kuala_Lumpur | Asia/Kuching | Asia/Kuwait | Asia/Macao |
Asia/Macau | Asia/Magadan | Asia/Makassar | Asia/Manila | Asia/Muscat |
Asia/Nicosia | Asia/Novokuznetsk | Asia/Novosibirsk | Asia/Omsk | Asia/Oral |
Asia/Phnom_Penh | Asia/Pontianak | Asia/Pyongyang | Asia/Qatar | Asia/Qyzylorda |
Asia/Rangoon | Asia/Riyadh | Asia/Saigon | Asia/Sakhalin | Asia/Samarkand |
Asia/Seoul | Asia/Shanghai | Asia/Singapore | Asia/Taipei | Asia/Tashkent |
Asia/Tbilisi | Asia/Tehran | Asia/Tel_Aviv | Asia/Thimbu | Asia/Thimphu |
Asia/Tokyo | Asia/Ujung_Pandang | Asia/Ulaanbaatar | Asia/Ulan_Bator | Asia/Urumqi |
Asia/Ust-Nera | Asia/Vientiane | Asia/Vladivostok | Asia/Yakutsk | Asia/Yekaterinburg |
Asia/Yerevan |
Atlantic/Azores | Atlantic/Bermuda | Atlantic/Canary | Atlantic/Cape_Verde | Atlantic/Faeroe |
Atlantic/Faroe | Atlantic/Jan_Mayen | Atlantic/Madeira | Atlantic/Reykjavik | Atlantic/South_Georgia |
Atlantic/St_Helena | Atlantic/Stanley |
Australia/ACT | Australia/Adelaide | Australia/Brisbane | Australia/Broken_Hill | Australia/Canberra |
Australia/Currie | Australia/Darwin | Australia/Eucla | Australia/Hobart | Australia/LHI |
Australia/Lindeman | Australia/Lord_Howe | Australia/Melbourne | Australia/North | Australia/NSW |
Australia/Perth | Australia/Queensland | Australia/South | Australia/Sydney | Australia/Tasmania |
Australia/Victoria | Australia/West | Australia/Yancowinna |
Europe/Amsterdam | Europe/Andorra | Europe/Athens | Europe/Belfast | Europe/Belgrade |
Europe/Berlin | Europe/Bratislava | Europe/Brussels | Europe/Bucharest | Europe/Budapest |
Europe/Busingen | Europe/Chisinau | Europe/Copenhagen | Europe/Dublin | Europe/Gibraltar |
Europe/Guernsey | Europe/Helsinki | Europe/Isle_of_Man | Europe/Istanbul | Europe/Jersey |
Europe/Kaliningrad | Europe/Kiev | Europe/Lisbon | Europe/Ljubljana | Europe/London |
Europe/Luxembourg | Europe/Madrid | Europe/Malta | Europe/Mariehamn | Europe/Minsk |
Europe/Monaco | Europe/Moscow | Europe/Nicosia | Europe/Oslo | Europe/Paris |
Europe/Podgorica | Europe/Prague | Europe/Riga | Europe/Rome | Europe/Samara |
Europe/San_Marino | Europe/Sarajevo | Europe/Simferopol | Europe/Skopje | Europe/Sofia |
Europe/Stockholm | Europe/Tallinn | Europe/Tirane | Europe/Tiraspol | Europe/Uzhgorod |
Europe/Vaduz | Europe/Vatican | Europe/Vienna | Europe/Vilnius | Europe/Volgograd |
Europe/Warsaw | Europe/Zagreb | Europe/Zaporozhye | Europe/Zurich |
Indian/Antananarivo | Indian/Chagos | Indian/Christmas | Indian/Cocos | Indian/Comoro |
Indian/Kerguelen | Indian/Mahe | Indian/Maldives | Indian/Mauritius | Indian/Mayotte |
Indian/Reunion |
Pacific/Apia | Pacific/Auckland | Pacific/Chatham | Pacific/Chuuk | Pacific/Easter |
Pacific/Efate | Pacific/Enderbury | Pacific/Fakaofo | Pacific/Fiji | Pacific/Funafuti |
Pacific/Galapagos | Pacific/Gambier | Pacific/Guadalcanal | Pacific/Guam | Pacific/Honolulu |
Pacific/Johnston | Pacific/Kiritimati | Pacific/Kosrae | Pacific/Kwajalein | Pacific/Majuro |
Pacific/Marquesas | Pacific/Midway | Pacific/Nauru | Pacific/Niue | Pacific/Norfolk |
Pacific/Noumea | Pacific/Pago_Pago | Pacific/Palau | Pacific/Pitcairn | Pacific/Pohnpei |
Pacific/Ponape | Pacific/Port_Moresby | Pacific/Rarotonga | Pacific/Saipan | Pacific/Samoa |
Pacific/Tahiti | Pacific/Tarawa | Pacific/Tongatapu | Pacific/Truk | Pacific/Wake |
Pacific/Wallis | Pacific/Yap |