From 3ce14fde5cd5f15171a7ed2b64fdc7bd652c3842 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 24 Sep 2013 13:06:51 +0000 Subject: [PATCH] Normalize parameter names of array functions Normalizing parameter names in docs first to later update arginfos from that. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@331477 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../array/functions/array-change-key-case.xml | 10 ++--- reference/array/functions/array-chunk.xml | 4 +- reference/array/functions/array-column.xml | 6 +-- .../array/functions/array-count-values.xml | 10 ++--- reference/array/functions/array-diff-ukey.xml | 2 +- reference/array/functions/array-filter.xml | 19 ++++---- reference/array/functions/array-flip.xml | 10 ++--- .../array/functions/array-intersect-assoc.xml | 4 +- .../array/functions/array-intersect-key.xml | 4 +- .../functions/array-intersect-uassoc.xml | 4 +- .../array/functions/array-intersect-ukey.xml | 2 +- reference/array/functions/array-intersect.xml | 4 +- .../array/functions/array-key-exists.xml | 8 ++-- reference/array/functions/array-keys.xml | 10 ++--- reference/array/functions/array-map.xml | 8 ++-- reference/array/functions/array-multisort.xml | 43 ++++++++++++------- reference/array/functions/array-pad.xml | 38 ++++++++-------- reference/array/functions/array-push.xml | 8 ++-- reference/array/functions/array-rand.xml | 8 ++-- reference/array/functions/array-reduce.xml | 12 +++--- .../functions/array-replace-recursive.xml | 16 +++---- reference/array/functions/array-replace.xml | 11 ++--- reference/array/functions/array-splice.xml | 2 +- .../array/functions/array-udiff-assoc.xml | 6 +-- .../array/functions/array-udiff-uassoc.xml | 6 +-- reference/array/functions/array-udiff.xml | 6 +-- .../functions/array-uintersect-assoc.xml | 6 +-- .../functions/array-uintersect-uassoc.xml | 6 +-- .../array/functions/array-uintersect.xml | 6 +-- reference/array/functions/array-unshift.xml | 6 +-- reference/array/functions/array-values.xml | 6 +-- .../array/functions/array-walk-recursive.xml | 24 +++++------ reference/array/functions/array-walk.xml | 28 ++++++------ reference/array/functions/compact.xml | 4 +- reference/array/functions/count.xml | 12 +++--- reference/array/functions/extract.xml | 23 +++++----- reference/array/functions/list.xml | 4 +- reference/array/functions/uasort.xml | 4 +- reference/array/functions/uksort.xml | 4 +- reference/array/functions/usort.xml | 6 +-- 40 files changed, 203 insertions(+), 197 deletions(-) diff --git a/reference/array/functions/array-change-key-case.xml b/reference/array/functions/array-change-key-case.xml index 7edc0f0139..64e78077bb 100644 --- a/reference/array/functions/array-change-key-case.xml +++ b/reference/array/functions/array-change-key-case.xml @@ -10,11 +10,11 @@ &reftitle.description; arrayarray_change_key_case - arrayinput + arrayarray intcaseCASE_LOWER - Returns an array with all keys from input lowercased + Returns an array with all keys from array lowercased or uppercased. Numbered indices are left as is. @@ -25,7 +25,7 @@ - input + array The array to work on @@ -51,14 +51,14 @@ &reftitle.returnvalues; Returns an array with its keys lower or uppercased, or &false; if - input is not an array. + array is not an array. &reftitle.errors; - Throws E_WARNING if input is + Throws E_WARNING if array is not an array. diff --git a/reference/array/functions/array-chunk.xml b/reference/array/functions/array-chunk.xml index ae2278da7d..8197098c0a 100644 --- a/reference/array/functions/array-chunk.xml +++ b/reference/array/functions/array-chunk.xml @@ -10,7 +10,7 @@ &reftitle.description; arrayarray_chunk - arrayinput + arrayarray intsize boolpreserve_keysfalse @@ -26,7 +26,7 @@ - input + array The array to work on diff --git a/reference/array/functions/array-column.xml b/reference/array/functions/array-column.xml index 94186ed191..8436164b36 100644 --- a/reference/array/functions/array-column.xml +++ b/reference/array/functions/array-column.xml @@ -9,13 +9,13 @@ &reftitle.description; arrayarray_column - arrayinput + arrayarray mixedcolumn_key mixedindex_keynull array_column returns the values from a single column of - the input array, identified by the + the array, identified by the column_key. Optionally, you may provide an index_key to index the values in the returned array by the values from the index_key column in the input @@ -27,7 +27,7 @@ - input + array A multi-dimensional array (record set) from which to pull a column of diff --git a/reference/array/functions/array-count-values.xml b/reference/array/functions/array-count-values.xml index 90edf732bb..59086097c4 100644 --- a/reference/array/functions/array-count-values.xml +++ b/reference/array/functions/array-count-values.xml @@ -10,12 +10,12 @@ &reftitle.description; arrayarray_count_values - arrayinput + arrayarray array_count_values returns an array using - the values of the input array as keys and - their frequency in input as values. + the values of array as keys and + their frequency in array as values. @@ -25,7 +25,7 @@ - input + array The array of values to count @@ -40,7 +40,7 @@ &reftitle.returnvalues; - Returns an associative array of values from input as + Returns an associative array of values from array as keys and their count as value. diff --git a/reference/array/functions/array-diff-ukey.xml b/reference/array/functions/array-diff-ukey.xml index f49af8f7c8..4fb8489074 100644 --- a/reference/array/functions/array-diff-ukey.xml +++ b/reference/array/functions/array-diff-ukey.xml @@ -12,7 +12,7 @@ arrayarray_diff_ukey arrayarray1 arrayarray2 - array ... + array... callablekey_compare_func diff --git a/reference/array/functions/array-filter.xml b/reference/array/functions/array-filter.xml index 393053e745..1e66bfbca6 100644 --- a/reference/array/functions/array-filter.xml +++ b/reference/array/functions/array-filter.xml @@ -10,16 +10,15 @@ &reftitle.description; arrayarray_filter - arrayinput - callablecallback"" + arrayarray + callablecallback - Iterates over each value in - the input array passing them to the - callback function. If the - callback function returns true, the current - value from input is returned into the - result array. Array keys are preserved. + Iterates over each value in the array + passing them to the callback function. + If the callback function returns true, the + current value from array is returned into + the result array. Array keys are preserved. @@ -29,7 +28,7 @@ - input + array The array to iterate over @@ -45,7 +44,7 @@ If no callback is supplied, all entries of - input equal to &false; (see + array equal to &false; (see converting to boolean) will be removed. diff --git a/reference/array/functions/array-flip.xml b/reference/array/functions/array-flip.xml index 47ae03706f..5613fe78a5 100644 --- a/reference/array/functions/array-flip.xml +++ b/reference/array/functions/array-flip.xml @@ -9,15 +9,15 @@ &reftitle.description; arrayarray_flip - arraytrans + arrayarray array_flip returns an array in flip - order, i.e. keys from trans become values and values - from trans become keys. + order, i.e. keys from array become values and values + from array become keys. - Note that the values of trans need to be valid + Note that the values of array need to be valid keys, i.e. they need to be either integer or string. A warning will be emitted if a value has the wrong type, and the key/value pair in question will not be included @@ -34,7 +34,7 @@ - trans + array An array of key/value pairs to be flipped. diff --git a/reference/array/functions/array-intersect-assoc.xml b/reference/array/functions/array-intersect-assoc.xml index 5933e0520f..4e20d54d6b 100644 --- a/reference/array/functions/array-intersect-assoc.xml +++ b/reference/array/functions/array-intersect-assoc.xml @@ -12,7 +12,7 @@ arrayarray_intersect_assoc arrayarray1 arrayarray2 - array ... + array... array_intersect_assoc returns an array @@ -43,7 +43,7 @@ - array + ... A variable list of arrays to compare. diff --git a/reference/array/functions/array-intersect-key.xml b/reference/array/functions/array-intersect-key.xml index 3b0131e3e7..3cf58411cd 100644 --- a/reference/array/functions/array-intersect-key.xml +++ b/reference/array/functions/array-intersect-key.xml @@ -12,7 +12,7 @@ arrayarray_intersect_key arrayarray1 arrayarray2 - array ... + array... array_intersect_key returns an array @@ -42,7 +42,7 @@ - array + ... A variable list of arrays to compare. diff --git a/reference/array/functions/array-intersect-uassoc.xml b/reference/array/functions/array-intersect-uassoc.xml index 2c85a83a2b..a8026acfaf 100644 --- a/reference/array/functions/array-intersect-uassoc.xml +++ b/reference/array/functions/array-intersect-uassoc.xml @@ -12,7 +12,7 @@ arrayarray_intersect_uassoc arrayarray1 arrayarray2 - array ... + array... callablekey_compare_func @@ -44,7 +44,7 @@ - array + ... Variable list of array arguments to compare values against. diff --git a/reference/array/functions/array-intersect-ukey.xml b/reference/array/functions/array-intersect-ukey.xml index 4ff5dbbe86..79d7f6c7c5 100644 --- a/reference/array/functions/array-intersect-ukey.xml +++ b/reference/array/functions/array-intersect-ukey.xml @@ -42,7 +42,7 @@ - array + ... Variable list of array arguments to compare keys against. diff --git a/reference/array/functions/array-intersect.xml b/reference/array/functions/array-intersect.xml index 9a5a8e354b..603576cf3a 100644 --- a/reference/array/functions/array-intersect.xml +++ b/reference/array/functions/array-intersect.xml @@ -12,7 +12,7 @@ arrayarray_intersect arrayarray1 arrayarray2 - array ... + array... array_intersect returns an array @@ -43,7 +43,7 @@ - array + ... A variable list of arrays to compare. diff --git a/reference/array/functions/array-key-exists.xml b/reference/array/functions/array-key-exists.xml index 3051a5bca2..4fff791c95 100644 --- a/reference/array/functions/array-key-exists.xml +++ b/reference/array/functions/array-key-exists.xml @@ -11,7 +11,7 @@ boolarray_key_exists mixedkey - arraysearch + arrayarray array_key_exists returns &true; if the @@ -34,7 +34,7 @@ - search + array An array with keys to check. @@ -105,8 +105,8 @@ array_key_exists('first', $search_array); For backward compatibility reasons, array_key_exists will also return &true; if key is a property defined within an object given as - search. This behaviour should not be relied upon, - and care should be taken to ensure that search is + array. This behaviour should not be relied upon, + and care should be taken to ensure that array is an array. diff --git a/reference/array/functions/array-keys.xml b/reference/array/functions/array-keys.xml index 5e4ea41ef6..b5c508cc21 100644 --- a/reference/array/functions/array-keys.xml +++ b/reference/array/functions/array-keys.xml @@ -10,18 +10,18 @@ &reftitle.description; arrayarray_keys - arrayinput + arrayarray mixedsearch_value&null; boolstrictfalse array_keys returns the keys, numeric and - string, from the input array. + string, from the array. If the optional search_value is specified, then only the keys for that value are returned. Otherwise, all - the keys from the input are returned. + the keys from the array are returned. @@ -30,7 +30,7 @@ - input + array An array containing keys to return. @@ -60,7 +60,7 @@ &reftitle.returnvalues; - Returns an array of all the keys in input. + Returns an array of all the keys in array. diff --git a/reference/array/functions/array-map.xml b/reference/array/functions/array-map.xml index a8b1505868..ab2793d57b 100644 --- a/reference/array/functions/array-map.xml +++ b/reference/array/functions/array-map.xml @@ -11,12 +11,12 @@ arrayarray_map callablecallback - arrayarr1 + arrayarray1 array... array_map returns an array containing all - the elements of arr1 after applying the + the elements of array1 after applying the callback function to each one. The number of parameters that the callback function accepts @@ -38,7 +38,7 @@ - arr1 + array1 An array to run through the callback function. @@ -61,7 +61,7 @@ &reftitle.returnvalues; - Returns an array containing all the elements of arr1 + Returns an array containing all the elements of array1 after applying the callback function to each one. diff --git a/reference/array/functions/array-multisort.xml b/reference/array/functions/array-multisort.xml index 2d755ba150..5a76a3e463 100644 --- a/reference/array/functions/array-multisort.xml +++ b/reference/array/functions/array-multisort.xml @@ -9,9 +9,9 @@ &reftitle.description; boolarray_multisort - arrayarr - mixedargSORT_ASC - mixedargSORT_REGULAR + arrayarray1 + mixedarray1_sort_orderSORT_ASC + mixedarray1_sort_flagsSORT_REGULAR mixed... @@ -30,7 +30,7 @@ - arr + array1 An array being sorted. @@ -38,21 +38,28 @@ - arg + array1_sort_order - Optionally another array, or sort options for the - previous array argument: + The order used to sort the previous array argument. Either + SORT_ASC to sort ascendingly or SORT_DESC + to sort descendingly. + + + This argument can be swapped with array1_sort_flags + or omitted entirely, in which case SORT_ASC is assumed. + + + + + array1_sort_flags + + + Sort options for the previous array argument: Sorting type flags: - - SORT_ASC - sort items ascendingly. - - - SORT_DESC - sort items descendingly. - SORT_REGULAR - compare items normally (don't change types) @@ -86,13 +93,17 @@ + + This argument can be swapped with array1_sort_order + or omitted entirely, in which case SORT_REGULAR is assumed. + ... - Additional arg's. + More arrays, optionally followed by sort order and flags. @@ -123,14 +134,14 @@ 5.4.0 The SORT_NATURAL and SORT_FLAG_CASE - were added to arg as possible sort flags. + were added to array1_sort_flags as possible sort flags. 5.3.0 The SORT_LOCALE_STRING was added to - arg as possible sort flags. + array1_sort_flags as possible sort flags. diff --git a/reference/array/functions/array-pad.xml b/reference/array/functions/array-pad.xml index 0847b84bbb..15e044b01e 100644 --- a/reference/array/functions/array-pad.xml +++ b/reference/array/functions/array-pad.xml @@ -10,19 +10,19 @@ &reftitle.description; arrayarray_pad - arrayinput - intpad_size - mixedpad_value + arrayarray + intsize + mixedvalue array_pad returns a copy of the - input padded to size specified by - pad_size with value - pad_value. If - pad_size is positive then the array is + array padded to size specified by + size with value + value. If + size is positive then the array is padded on the right, if it's negative then on the left. If the - absolute value of pad_size is less than or - equal to the length of the input then no + absolute value of size is less than or + equal to the length of the array then no padding takes place. It is possible to add at most 1048576 elements at a time. @@ -33,7 +33,7 @@ - input + array Initial array of values to pad. @@ -41,7 +41,7 @@ - pad_size + size New size of the array. @@ -49,11 +49,11 @@ - pad_value + value - Value to pad if input is less than - pad_size. + Value to pad if array is less than + size. @@ -64,12 +64,12 @@ &reftitle.returnvalues; - Returns a copy of the input padded to size specified - by pad_size with value - pad_value. If pad_size is + Returns a copy of the array padded to size specified + by size with value + value. If size is positive then the array is padded on the right, if it's negative then - on the left. If the absolute value of pad_size is less - than or equal to the length of the input then no + on the left. If the absolute value of size is less + than or equal to the length of the array then no padding takes place. diff --git a/reference/array/functions/array-push.xml b/reference/array/functions/array-push.xml index 9ef6574055..31baa29a20 100644 --- a/reference/array/functions/array-push.xml +++ b/reference/array/functions/array-push.xml @@ -10,7 +10,7 @@ intarray_push arrayarray - mixedvar + mixedvalue1 mixed... @@ -25,7 +25,7 @@ $array[] = $var; ?> ]]> - repeated for each var. + repeated for each passed value. @@ -55,10 +55,10 @@ $array[] = $var; - var + value1 - The pushed value. + The first value to push onto the end of the array. diff --git a/reference/array/functions/array-rand.xml b/reference/array/functions/array-rand.xml index afe86f2ceb..2f6aaca37e 100644 --- a/reference/array/functions/array-rand.xml +++ b/reference/array/functions/array-rand.xml @@ -9,8 +9,8 @@ &reftitle.description; mixedarray_rand - arrayinput - intnum_req1 + arrayarray + intnum1 Picks one or more random entries out of an array, and returns the @@ -22,7 +22,7 @@ - input + array The input array. @@ -30,7 +30,7 @@ - num_req + num Specifies how many entries you want to pick. Trying to pick more diff --git a/reference/array/functions/array-reduce.xml b/reference/array/functions/array-reduce.xml index 33889ed067..228a37f7c7 100644 --- a/reference/array/functions/array-reduce.xml +++ b/reference/array/functions/array-reduce.xml @@ -9,14 +9,14 @@ &reftitle.description; mixedarray_reduce - arrayinput - callablefunction + arrayarray + callablecallback mixedinitial&null; array_reduce applies iteratively the - function function to the elements of the - array input, so as to reduce the array to + callback function to the elements of the + array, so as to reduce the array to a single value. @@ -25,7 +25,7 @@ - input + array The input array. @@ -33,7 +33,7 @@ - function + callback The callback function. diff --git a/reference/array/functions/array-replace-recursive.xml b/reference/array/functions/array-replace-recursive.xml index e5c66534bf..d1be98af5b 100644 --- a/reference/array/functions/array-replace-recursive.xml +++ b/reference/array/functions/array-replace-recursive.xml @@ -9,13 +9,13 @@ &reftitle.description; arrayarray_replace_recursive - arrayarray arrayarray1 + arrayarray2 array... - array_replace_recursive replaces the values of the first - array with the same values from all the following + array_replace_recursive replaces the values of + array1 with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be created in the first array. @@ -28,9 +28,9 @@ arrays and apply the same process to the inner value. - When the value in array is scalar, it will be replaced - by the value in array1, may it be scalar or array. - When the value in array and array1 + When the value in array1 is scalar, it will be replaced + by the value in array2, may it be scalar or array. + When the value in array1 and array2 are both arrays, array_replace_recursive will replace their respective value recursively. @@ -40,7 +40,7 @@ - array + array1 The array in which elements are replaced. @@ -48,7 +48,7 @@ - array1 + array2 The array from which elements will be extracted. diff --git a/reference/array/functions/array-replace.xml b/reference/array/functions/array-replace.xml index 24947149c8..2314c5b599 100644 --- a/reference/array/functions/array-replace.xml +++ b/reference/array/functions/array-replace.xml @@ -9,13 +9,13 @@ &reftitle.description; arrayarray_replace - arrayarray arrayarray1 + arrayarray2 array... - array_replace replaces the values of the first - array with the same values from all the following + array_replace replaces the values of + array1 with the same values from all the following arrays. If a key from the first array exists in the second array, its value will be replaced by the value from the second array. If the key exists in the second array, and not the first, it will be created in the first array. @@ -33,7 +33,7 @@ - array + array1 The array in which elements are replaced. @@ -41,7 +41,7 @@ - array1 + array2 The array from which elements will be extracted. @@ -104,6 +104,7 @@ Array array_replace_recursive + array_merge diff --git a/reference/array/functions/array-splice.xml b/reference/array/functions/array-splice.xml index 66b4706aa7..f03499f983 100644 --- a/reference/array/functions/array-splice.xml +++ b/reference/array/functions/array-splice.xml @@ -11,7 +11,7 @@ arrayarray_splice arrayinput intoffset - intlengthcount($input) + intlength mixedreplacementarray() diff --git a/reference/array/functions/array-udiff-assoc.xml b/reference/array/functions/array-udiff-assoc.xml index 25291de30d..0d498b015a 100644 --- a/reference/array/functions/array-udiff-assoc.xml +++ b/reference/array/functions/array-udiff-assoc.xml @@ -11,8 +11,8 @@ arrayarray_udiff_assoc arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func Computes the difference of arrays with additional index check, compares @@ -47,7 +47,7 @@ - data_compare_func + value_compare_func &return.callbacksort; diff --git a/reference/array/functions/array-udiff-uassoc.xml b/reference/array/functions/array-udiff-uassoc.xml index 448bad18a5..5480ec10ac 100644 --- a/reference/array/functions/array-udiff-uassoc.xml +++ b/reference/array/functions/array-udiff-uassoc.xml @@ -11,8 +11,8 @@ arrayarray_udiff_uassoc arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func callablekey_compare_func @@ -45,7 +45,7 @@ - data_compare_func + value_compare_func &return.callbacksort; diff --git a/reference/array/functions/array-udiff.xml b/reference/array/functions/array-udiff.xml index 7544918f4c..69bf0b6936 100644 --- a/reference/array/functions/array-udiff.xml +++ b/reference/array/functions/array-udiff.xml @@ -11,8 +11,8 @@ arrayarray_udiff arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func Computes the difference of arrays by using a callback function for data @@ -41,7 +41,7 @@ - data_compare_func + value_compare_func The callback comparison function. diff --git a/reference/array/functions/array-uintersect-assoc.xml b/reference/array/functions/array-uintersect-assoc.xml index 25cab286dd..72f457472d 100644 --- a/reference/array/functions/array-uintersect-assoc.xml +++ b/reference/array/functions/array-uintersect-assoc.xml @@ -11,8 +11,8 @@ arrayarray_uintersect_assoc arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func Computes the intersection of arrays with additional index check, compares @@ -45,7 +45,7 @@ - data_compare_func + value_compare_func &return.callbacksort; diff --git a/reference/array/functions/array-uintersect-uassoc.xml b/reference/array/functions/array-uintersect-uassoc.xml index 03b1b4da28..07417e6115 100644 --- a/reference/array/functions/array-uintersect-uassoc.xml +++ b/reference/array/functions/array-uintersect-uassoc.xml @@ -11,8 +11,8 @@ arrayarray_uintersect_uassoc arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func callablekey_compare_func @@ -43,7 +43,7 @@ - data_compare_func + value_compare_func &return.callbacksort; diff --git a/reference/array/functions/array-uintersect.xml b/reference/array/functions/array-uintersect.xml index 47d3aa0e75..65776cd4a2 100644 --- a/reference/array/functions/array-uintersect.xml +++ b/reference/array/functions/array-uintersect.xml @@ -11,8 +11,8 @@ arrayarray_uintersect arrayarray1 arrayarray2 - array ... - callabledata_compare_func + array... + callablevalue_compare_func Computes the intersection of arrays, compares data by a callback function. @@ -39,7 +39,7 @@ - data_compare_func + value_compare_func &return.callbacksort; diff --git a/reference/array/functions/array-unshift.xml b/reference/array/functions/array-unshift.xml index cdcd3fdd04..efc5800a56 100644 --- a/reference/array/functions/array-unshift.xml +++ b/reference/array/functions/array-unshift.xml @@ -10,7 +10,7 @@ intarray_unshift arrayarray - mixedvar + mixedvalue1 mixed... @@ -34,10 +34,10 @@ - var + value1 - The prepended variable. + First value to prepend. diff --git a/reference/array/functions/array-values.xml b/reference/array/functions/array-values.xml index f112274a57..9cebe651ae 100644 --- a/reference/array/functions/array-values.xml +++ b/reference/array/functions/array-values.xml @@ -9,11 +9,11 @@ &reftitle.description; arrayarray_values - arrayinput + arrayarray array_values returns all the values from the - input array and indexes the array numerically. + array and indexes the array numerically. @@ -21,7 +21,7 @@ - input + array The array. diff --git a/reference/array/functions/array-walk-recursive.xml b/reference/array/functions/array-walk-recursive.xml index 862094fc03..655a27a9d1 100644 --- a/reference/array/functions/array-walk-recursive.xml +++ b/reference/array/functions/array-walk-recursive.xml @@ -9,13 +9,13 @@ &reftitle.description; boolarray_walk_recursive - arrayinput - callablefuncname + arrayarray + callablecallback mixeduserdata&null; - Applies the user-defined function funcname to each - element of the input array. This function will recurse + Applies the user-defined callback function to each + element of the array. This function will recurse into deeper arrays. @@ -24,7 +24,7 @@ - input + array The input array. @@ -32,18 +32,18 @@ - funcname + callback - Typically, funcname takes on two parameters. - The input parameter's value being the first, and + Typically, callback takes on two parameters. + The array parameter's value being the first, and the key/index second. - If funcname needs to be working with the + If callback needs to be working with the actual values of the array, specify the first parameter of - funcname as a + callback as a reference. Then, any changes made to those elements will be made in the original array itself. @@ -56,8 +56,8 @@ If the optional userdata parameter is supplied, - it will be passed as the third parameter to the callback - funcname. + it will be passed as the third parameter to the + callback. diff --git a/reference/array/functions/array-walk.xml b/reference/array/functions/array-walk.xml index 636f8523d1..68c192112d 100644 --- a/reference/array/functions/array-walk.xml +++ b/reference/array/functions/array-walk.xml @@ -10,11 +10,11 @@ boolarray_walk arrayarray - callablefuncname + callablecallback mixeduserdata&null; - Applies the user-defined function funcname to each + Applies the user-defined callback function to each element of the array array. @@ -36,18 +36,18 @@ - funcname + callback - Typically, funcname takes on two parameters. + Typically, callback takes on two parameters. The array parameter's value being the first, and the key/index second. - If funcname needs to be working with the + If callback needs to be working with the actual values of the array, specify the first parameter of - funcname as a + callback as a reference. Then, any changes made to those elements will be made in the original array itself. @@ -57,8 +57,8 @@ Many internal functions (for example strtolower) will throw a warning if more than the expected number of argument - are passed in and are not usable directly as - funcname. + are passed in and are not usable directly as a + callback. @@ -75,8 +75,8 @@ If the optional userdata parameter is supplied, - it will be passed as the third parameter to the callback - funcname. + it will be passed as the third parameter to the + callback. @@ -92,14 +92,10 @@ &reftitle.errors; - If function funcname requires more parameters than + If function callback requires more parameters than given to it, an error of level E_WARNING will be generated each time array_walk - calls funcname. These warnings may be suppressed by - prepending the PHP error operator - @ to the - array_walk call, or by using - error_reporting. + calls callback. diff --git a/reference/array/functions/compact.xml b/reference/array/functions/compact.xml index 2f505f04af..147478da08 100644 --- a/reference/array/functions/compact.xml +++ b/reference/array/functions/compact.xml @@ -9,7 +9,7 @@ &reftitle.description; arraycompact - mixedvarname + mixedvarname1 mixed... @@ -31,7 +31,7 @@ - varname + varname1 compact takes a variable number of parameters. diff --git a/reference/array/functions/count.xml b/reference/array/functions/count.xml index 1786b30d80..1c0c037d8d 100644 --- a/reference/array/functions/count.xml +++ b/reference/array/functions/count.xml @@ -9,7 +9,7 @@ &reftitle.description; intcount - mixedvar + mixedarray_or_countable intmodeCOUNT_NORMAL @@ -34,10 +34,10 @@ - var + array_or_countable - The array or the object. + An array or Countable object. @@ -66,11 +66,11 @@ &reftitle.returnvalues; - Returns the number of elements in var. - If var is not an array or not an object with + Returns the number of elements in array_or_countable. + If the parameter is not an array or not an object with implemented Countable interface, 1 will be returned. - There is one exception, if var is &null;, + There is one exception, if array_or_countable is &null;, 0 will be returned. diff --git a/reference/array/functions/extract.xml b/reference/array/functions/extract.xml index 17872c7088..7ca9aa4701 100644 --- a/reference/array/functions/extract.xml +++ b/reference/array/functions/extract.xml @@ -9,8 +9,8 @@ &reftitle.description; intextract - arrayvar_array - intextract_typeEXTR_OVERWRITE + arrayarray + intflagsEXTR_OVERWRITE stringprefix&null; @@ -27,14 +27,13 @@ - var_array + array An associative array. This function treats keys as variable names and values as variable values. For each key/value pair it will create a variable in the current symbol table, subject to - extract_type and - prefix parameters. + flags and prefix parameters. You must use an associative array; a numerically indexed array @@ -44,11 +43,11 @@ - extract_type + flags The way invalid/numeric keys and collisions are treated is determined - by the extract_type. It can be one of the + by the extraction flags. It can be one of the following values: @@ -121,16 +120,16 @@ Extracts variables as references. This effectively means that the values of the imported variables are still referencing the values of - the var_array parameter. You can use this flag + the array parameter. You can use this flag on its own or combine it with any other flag by OR'ing the - extract_type. + flags. - If extract_type is not specified, it is + If flags is not specified, it is assumed to be EXTR_OVERWRITE. @@ -140,7 +139,7 @@ Note that prefix is only required if - extract_type is EXTR_PREFIX_SAME, + flags is EXTR_PREFIX_SAME, EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID or EXTR_PREFIX_IF_EXISTS. If the prefixed result is not a valid variable name, it is not @@ -255,7 +254,7 @@ blue, large, sphere, medium If you do, for example if you want to run old code that relies on register_globals temporarily, make sure you use one of the non-overwriting - extract_type values such as + flags values such as EXTR_SKIP and be aware that you should extract in the same order that's defined in variables_order within the diff --git a/reference/array/functions/list.xml b/reference/array/functions/list.xml index ee5e13d7d9..5a1f801a30 100644 --- a/reference/array/functions/list.xml +++ b/reference/array/functions/list.xml @@ -9,7 +9,7 @@ &reftitle.description; arraylist - mixedvarname + mixedvar1 mixed... @@ -23,7 +23,7 @@ - varname + var1 A variable. diff --git a/reference/array/functions/uasort.xml b/reference/array/functions/uasort.xml index 2edc26b9a6..dffa15aa5a 100644 --- a/reference/array/functions/uasort.xml +++ b/reference/array/functions/uasort.xml @@ -11,7 +11,7 @@ booluasort arrayarray - callablecmp_function + callablevalue_compare_func This function sorts an array such that array indices maintain their @@ -37,7 +37,7 @@ - cmp_function + value_compare_func See usort and uksort for diff --git a/reference/array/functions/uksort.xml b/reference/array/functions/uksort.xml index 08170f38a7..0cc9e6891f 100644 --- a/reference/array/functions/uksort.xml +++ b/reference/array/functions/uksort.xml @@ -10,7 +10,7 @@ booluksort arrayarray - callablecmp_function + callablekey_compare_func uksort will sort the keys of an array using a @@ -32,7 +32,7 @@ - cmp_function + key_compare_func &return.callbacksort; diff --git a/reference/array/functions/usort.xml b/reference/array/functions/usort.xml index 64c02cb322..0eef626cc2 100644 --- a/reference/array/functions/usort.xml +++ b/reference/array/functions/usort.xml @@ -10,7 +10,7 @@ boolusort arrayarray - callablecmp_function + callablevalue_compare_func This function will sort an array by its values using a user-supplied @@ -37,7 +37,7 @@ - cmp_function + value_compare_func &return.callbacksort; @@ -78,7 +78,7 @@ 4.1.0 - A new sort algorithm was introduced. The cmp_function + A new sort algorithm was introduced. The value_compare_func doesn't keep the original order for elements comparing as equal.