Commit Graph

63 Commits

Author SHA1 Message Date
Xinchen Hui
a2045ff332 Happy New Year~ 2013-01-01 16:02:16 +08:00
Felipe Pena
e4ca0ed09f - Year++ 2012-01-01 13:15:04 +00:00
Felipe Pena
927bf09c29 - Year++ 2011-01-01 02:19:59 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
Johannes Schlüter
b9f7b21ec1 MFH (DOC] Add array_replace/array_replace_recursive (Mett Wilmas) 2008-07-31 20:18:17 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Jani Taskinen
b489251177 - MFH from HEAD:
. Folding tags
  . Parameter parsing
  . SPL debug info
  . array function improvements (not all yet)
  . Improvements to function calling with call_user_* functions
  . Improvements to debugging info in var_dump/print_r
# I propably forgot already something but this all was pretty close tied
# to each other so it wasn't possible to do it in parts.
2007-11-02 19:40:39 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Marcus Boerger
87c64280b0 - MFH Added array_fill_keys(). (Marcus, Mathew W) 2006-07-15 10:21:10 +00:00
Andrei Zmievski
5735927d86 I swear it wasn't me. 2006-06-03 18:56:44 +00:00
Andrei Zmievski
7deff63e3c Move array globals declarations back to the header file. 2006-02-07 17:54:24 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Andrey Hristov
be3a9ccdf3 add function array_product() 2005-05-11 11:43:11 +00:00
Marcus Boerger
db47e478c5 - Use new way for global variables
- Cache class lookup
2004-11-01 12:09:46 +00:00
Andrey Hristov
5e5d2640fb add array_:
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.
2004-07-21 21:17:56 +00:00
foobar
ccfc46b0aa - Happy new year and PHP 5 for rest of the files too..
# Should the LICENSE and Zend/LICENSE dates be updated too?
2004-01-08 17:33:29 +00:00
Andrey Hristov
638b940307 New array functions for doing intersection of arrays that are complementary
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.
2003-10-09 08:10:39 +00:00
Andrey Hristov
3579f212df 4 new functions :
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).
2003-09-23 17:37:29 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Ilia Alshanetsky
f12a6b7663 Added array_walk_recursive() function that can apply array_walk recursively
to an array.
2003-02-05 17:56:08 +00:00
Andrey Hristov
1cdc956637 added array_combine().
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.
2003-01-13 18:12:23 +00:00
Sebastian Bergmann
b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Andrey Hristov
a920f00479 New function added - array_intersect_assoc() similar to array_intersect()
but the keys are also used in the comparison. So the result is a subset of
the result of array_intersect().
Test will be committed too.
2002-09-21 14:50:04 +00:00
Andrey Hristov
afdfe38ef3 New function added : array_diff_assoc() . Like array_diff() but does
additional checks on key values. Test script will be added too.
#My first patch . it feels strange :)
2002-09-11 18:13:48 +00:00
Edin Kadribasic
333b01b041 Fixed ZTS build. 2002-09-10 22:36:43 +00:00
Andrei Zmievski
dd7cf22443 @- Fixed array_merge_recursive() to avoid problems with merging cyclical
@  arrays (bug #16064). (Andrei)
2002-09-10 18:34:16 +00:00
Andrei Zmievski
1668570e4d Changing email address. 2002-05-13 17:28:38 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Derick Rethans
78e4644fa1 - Renaming key_exists to array_key_exists
@- 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.
2001-11-11 18:28:43 +00:00
Andrei Zmievski
2890b57e46 @- Added array_chunk() function that splits an array into chunks of specified
@  size. (Andrei)
2001-10-27 05:11:15 +00:00
Rasmus Lerdorf
72fc6bc4b1 As suggested on php-dev, array_fill() is probably a better name for this
function.
2001-10-23 18:46:35 +00:00
Rasmus Lerdorf
798ec79319 Motivated by bug #13607 I wrote up a simple array_init() function that
lets you quickly create an array and initialize each element to a certain
value.
@ Add array_init() function (Rasmus)
2001-10-21 07:42:35 +00:00
Edin Kadribasic
e78b61542d Added array_change_key_case() function that returns array with
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)
2001-10-05 18:38:53 +00:00
Sterling Hughes
bcb426a207 Merge in qsort changes 2001-09-17 21:02:53 +00:00
Zeev Suraski
7b1c400631 More TSRMLS_FETCH annihilation (Zend compatibility patch) 2001-07-30 04:58:07 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
David Croft
34f03f2c5c @ - Added key_exists() to check if a given key or index exists in an
@ array or object (David Croft)
Added key_exists() to check if a given key or index exists in an array or object
2001-04-30 04:06:09 +00:00
Andrei Zmievski
d9aa966a44 @- Added array_map() function that applies a callback to the elements
@  of given arrays and returns the result. It can also be used with a
@  null callback to transpose arrays. (Andrei)
2001-03-19 21:20:02 +00:00
Andrei Zmievski
770c66125d @- Added array_filter(), which allows filtering of array elements via
@  the specified callback. (Andrei)
2001-03-16 20:46:33 +00:00
Andrei Zmievski
d73ef12429 @- Added array_reduce(), which allows iterative reduction of an array
@  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.
2001-03-12 03:06:53 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Andrei Zmievski
1424e36315 Rename to array_search(). 2001-02-20 14:23:03 +00:00
Jason Greene
1888a98a4b Moved the core of in_array into the function php_search_array, which is called by
in_array and search_array (new)

@ Added search_array which works similar to in_array but returns
@ the key instead of a boolean. (jason@php.net)
2001-02-20 05:36:40 +00:00
Andrei Zmievski
753e46657f Make php_array_merge() an API function. 2000-12-11 05:36:24 +00:00
Andrei Zmievski
a35bf41670 Added array_sum() function. 2000-10-25 17:40:11 +00:00
David Croft
83513d9580 Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.
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.
2000-07-24 01:40:02 +00:00
Andrei Zmievski
3ac0ae9dff @- Improved array_multisort() to be able to specify sort type as well sort
@  order. Incidentally, it can be used to sort multi-dimensional arrays
@  as well. (Andrei)
2000-07-11 16:48:03 +00:00
Sascha Schumann
16017f6d78 Change header protection macros to conform to standard.
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.
2000-07-02 23:46:51 +00:00