Ilia Alshanetsky
ec4655f864
Fixed bug #27782 (Wrong behaviour of next(), prev() and each()).
22 years ago
Andrey Hristov
eaab3ef8cd
this should not belong to HEAD
22 years ago
Andrey Hristov
9957fc6305
Added third parameter (optional) to array_keys for strictness. It behaves
like the "strict" parameter of in_array().
#Closing feature request #24258
22 years ago
Andrey Hristov
9e5df0c666
HEAD is now bundled only with ZE2
22 years ago
Andi Gutmans
dbeb4158d2
- A belated happy holidays and PHP 5
22 years ago
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.
23 years ago
Ilia Alshanetsky
31a3c87159
Fixed clobbering of the source array, when merging complex
multi-dimensional arrays. Bug reported by Lukas Smith.
23 years ago
Moriyoshi Koizumi
75bb36ed09
Fixed bug #25708 (extract($GLOBALS, EXTR_REFS) mangles $GLOBALS)
23 years ago
Andrey Hristov
40088d0bbc
smash a segmentation fault
23 years ago
Andrey Hristov
02827c46be
Memory leak fixed (no need of MFH since this is code specific to PHP5)
23 years ago
Hartmut Holzgraefe
075e66cc08
signed/unsigned compiler warning fixes
23 years ago
Ilia Alshanetsky
6966350013
Fixed typo.
23 years ago
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).
23 years ago
Andrey Hristov
63d7df3e2f
improve the fix for #25494 . If more then one bad parameter is passed
an warning for all will be emitted.
23 years ago
Jay Smith
6c6fd76bac
Fixed bug #25494 (array_merge allowing "false" as argument (silent when
non-array is passed))
# 4.3 throws E_NOTICEs, 5 errors out on non-array args as per Ilia's
# suggestion.
23 years ago
foobar
8733d2dacb
revert that, it did not fix anything
23 years ago
foobar
0ee19d47d9
Fix external builds (configure run outside srcdir)
23 years ago
Ilia Alshanetsky
ed40ae2650
emalloc -> safe_emalloc
23 years ago
Ilia Alshanetsky
e5b7d5ccb4
Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort())
23 years ago
Ilia Alshanetsky
e49964fe99
Do not assume array contains numeric values.
23 years ago
Ilia Alshanetsky
a2873880f6
Fixed bug #24980 (array_reduce() uses first element as default running
total).
Fixed memory leak that can be replicated using the function example on
http://www.php.net/array_reduce
23 years ago
Zeev Suraski
90b29aa076
Replace fast_call_user_function() with zend_call_function()
23 years ago
Zeev Suraski
2547b6f6f6
Fix bug #24652 - Sterling, do you begin to think that maybe it wasn't such
a good idea?
23 years ago
Ilia Alshanetsky
ee3e4f79df
Removed unused variable.
23 years ago
Zeev Suraski
0a49c033d0
- Use the new infrastructure of zend_symtable_*() (fixes bug #24565 )
- Fix bogus use of get_current_key()
23 years ago
Ilia Alshanetsky
6057160dbf
Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive())
23 years ago
Andrey Hristov
2d4449caf9
silly bug
23 years ago
James Cox
f68c7ff249
updating license information in the headers.
23 years ago
Sterling Hughes
295a1c665c
fix array_key_exists() from HANDLE_NUMERIC() changes
# need to go through this file and find any stuff that relies on this
# change
23 years ago
Sterling Hughes
3c6fd35007
initialize these to NULL
23 years ago
Sterling Hughes
9ac50a13d7
convert array functions to use fast_call_user_function(), gives a nice
performance win.
23 years ago
Moriyoshi Koizumi
4e9e9c6e21
Fixed bug #22463 and bug #23581
23 years ago
Sara Golemon
07c679064a
Bug Fix (22433). When the bottom of a range() is chr(0) or the top is chr(255), the for loop carries over and never exits.
23 years ago
Moriyoshi Koizumi
0c5548e636
Fixed implicit cast issue with is*() and to*() functions
23 years ago
Sara Golemon
465bb61357
Kludgy fix for floating point drift causing problems like range(1.0,1.5,0.1) == array(1.0,1.1,1.2,1.3,1.4);
23 years ago
Rasmus Lerdorf
4b343a0562
MFB
23 years ago
Ilia Alshanetsky
3db5278dcc
CS
23 years ago
Andrey Hristov
8c2dbd5f0f
additional speedup for array_shift(). No need to rehash if the removed element's
key is not scalar and elements with scalar keys are already well numbered
(sequentially from 0) for some reason. This is the case if the leading
elements have no scalar indexes.
23 years ago
Andrey Hristov
94040a28ce
rehash only in case something is changed.
#lowers the execution time in half on my machine on array with 1000 elements
#with nonscalar keys. Maybe it can be optimized further.
23 years ago
foobar
20f9b6d02c
- Fixed bug #22088 (array_shift() leaves next index to be +1 too much)
23 years ago
Ilia Alshanetsky
f12a6b7663
Added array_walk_recursive() function that can apply array_walk recursively
to an array.
23 years ago
foobar
07a9729071
- Fixed bug: #21998 (array_pop() did not reset the current array position)
# This behaves now same as in PHP 4.2.3
23 years ago
Ilia Alshanetsky
38ad0e9104
zend_error -> php_error_docref.
23 years ago
Ilia Alshanetsky
8a9e09a44a
ARG_COUNT(ht) -> ZEND_NUM_ARGS().
23 years ago
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.
23 years ago
Moriyoshi Koizumi
f962ba6abb
Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
24 years ago
Sebastian Bergmann
b506f5c8f8
Bump year.
24 years ago
Ilia Alshanetsky
fbcee73c8c
Make range operate on the copies of the parameters rather then modify the
actual parameters.
24 years ago
Ilia Alshanetsky
3a4bf3f904
When low & high are the same return an array containing the low value.
Added support for float values and handling of numeric values being passed
as strings.
Added a test case for range().
24 years ago
Moriyoshi Koizumi
4974f268a6
@- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi)
24 years ago