intersect_key()
intersect_ukey()
diff_key()
diff_ukey()
The first two by a patch of Cristiano Duarte. The second two were
implemented in almost the same way except one small difference.
to array_*diff* family of functions. Namely array_uintersect(), array_uintersect_assoc(),
array_intersect_uassoc() and array_uintersect_uassoc(). Test case is also included.
#docs and news entry later.
array_udiff()
array_udiff_assoc()
array_diff_uassoc()
array_udiff_uassoc()
They work like array_diff() or array_diff_assoc() but callback function(s)
can be used to perform the comparisons. For example array_udiff_uassoc()
expects 2 callbacks are last 2 parameters one is used to compare the values
of the entries in the arrays the second to compare the keys.
Class methods are also valid callbacks. Even when the data that should be
used in the comparison is private or protected then a static method of a
class should be used (this behaviour can be seen in the regression test -
007.phpt).
Creates an array by using the elements of the first parameter as keys and
the elements of the second as correspoding keys. Error is thrown in case
the arrays has different number of elements. Number of elements 0 is not
valid for both parameters.
@- Renamed key_exists tp array_key_exists. (Derick)
#- Not sure if this belongs in NEWS, but it was already in a released
# version. And yes, I know I'm breaking BC here, but as it was not documented
# yet, that doesn't matter.
with all string keys lowercased or uppercased
@- Added array_change_key_case() function that returns array with
@ with all string keys lowercased or uppercased (EdinK)
@ to a single value via a callback function. (Andrei)
- Added array_reduce(), which allows iterative reduction of an array
to a single value via a callback function.
- Fixed usage of zend_is_callable() in PCRE.
Added a few RCS $Id$ tags.
# Note: I have avoided changing any .h files if the corresponding .c file
# had not already been changed as I am not sure if there are any legal
# issues here. So some extensions still have PHP 3 headers.
Draft 3 of IEEE 1003.1 200x, "2.2 The Compilation Environment"
All identifiers that begin with an underscore and either an uppercase
letter or another underscore are always reserved for any use by the
implementation.
@- Added natural comparison/sorting routines strnatcmp(), strnatcasecmp(),
@ natsort(), and natcasesort(). These are useful for comparing and sorting
@ strings that contain numbers. Based on the code from Martin Pool
@ <mbp@humbug.org.au>. See http://www.linuxcare.com.au/projects/natsort/
@ for more info on natural sorting. (Andrei)