1
0
mirror of https://github.com/php/php-src.git synced 2026-04-27 18:23:26 +02:00
Commit Graph

440 Commits

Author SHA1 Message Date
Ilia Alshanetsky e5b7d5ccb4 Fixed bug #24897 (inconsistent behavior of shuffle() & array_multisort()) 2003-08-09 20:49:00 +00:00
Ilia Alshanetsky e49964fe99 Do not assume array contains numeric values. 2003-08-09 16:43:28 +00:00
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
2003-08-08 23:50:36 +00:00
Zeev Suraski 90b29aa076 Replace fast_call_user_function() with zend_call_function() 2003-08-05 10:29:03 +00:00
Zeev Suraski 2547b6f6f6 Fix bug #24652 - Sterling, do you begin to think that maybe it wasn't such
a good idea?
2003-08-04 08:38:24 +00:00
Ilia Alshanetsky ee3e4f79df Removed unused variable. 2003-07-25 03:03:26 +00:00
Zeev Suraski 0a49c033d0 - Use the new infrastructure of zend_symtable_*() (fixes bug #24565)
- Fix bogus use of get_current_key()
2003-07-22 16:08:50 +00:00
Ilia Alshanetsky 6057160dbf Fixed bug #24198 (Invalid recursion detection in array_merge_recurcive()) 2003-06-16 17:35:16 +00:00
Andrey Hristov 2d4449caf9 silly bug 2003-06-12 15:11:11 +00:00
James Cox f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
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
2003-06-05 13:58:14 +00:00
Sterling Hughes 3c6fd35007 initialize these to NULL 2003-05-20 18:18:56 +00:00
Sterling Hughes 9ac50a13d7 convert array functions to use fast_call_user_function(), gives a nice
performance win.
2003-05-20 16:46:53 +00:00
Moriyoshi Koizumi 4e9e9c6e21 Fixed bug #22463 and bug #23581 2003-05-11 06:36:37 +00:00
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. 2003-05-02 00:58:02 +00:00
Moriyoshi Koizumi 0c5548e636 Fixed implicit cast issue with is*() and to*() functions 2003-04-16 21:40:48 +00:00
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); 2003-04-03 18:33:05 +00:00
Rasmus Lerdorf 4b343a0562 MFB 2003-04-01 21:47:21 +00:00
Ilia Alshanetsky 3db5278dcc CS 2003-03-27 18:57:53 +00:00
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.
2003-02-22 13:55:11 +00:00
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.
2003-02-22 10:54:26 +00:00
foobar 20f9b6d02c - Fixed bug #22088 (array_shift() leaves next index to be +1 too much) 2003-02-06 15:27:53 +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
foobar 07a9729071 - Fixed bug: #21998 (array_pop() did not reset the current array position)
# This behaves now same as in PHP 4.2.3
2003-02-03 16:57:02 +00:00
Ilia Alshanetsky 38ad0e9104 zend_error -> php_error_docref. 2003-01-24 16:29:40 +00:00
Ilia Alshanetsky 8a9e09a44a ARG_COUNT(ht) -> ZEND_NUM_ARGS(). 2003-01-21 14:56:40 +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
Moriyoshi Koizumi f962ba6abb Fixed small leaks in array_map() in case the first parameter is NULL like
array_map(NULL, array(...));
2003-01-03 05:05:12 +00:00
Sebastian Bergmann b506f5c8f8 Bump year. 2002-12-31 16:08:15 +00:00
Ilia Alshanetsky fbcee73c8c Make range operate on the copies of the parameters rather then modify the
actual parameters.
2002-12-25 20:02:03 +00:00
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().
2002-12-20 17:16:31 +00:00
Moriyoshi Koizumi 4974f268a6 @- Let array_search() accept objects as a needle under ZendEngine2. (Moriyoshi) 2002-12-09 15:54:38 +00:00
Ilia Alshanetsky ed7c3bfe0e Fixed bug #20865, array_key_exists() could not locate NULL keys. 2002-12-06 17:35:52 +00:00
Ilia Alshanetsky c668055159 Remove pointless checks for array_init() return values. 2002-12-05 22:28:02 +00:00
Moriyoshi Koizumi 7bf4090efb Fixed segfaults of array_walk() when keys are passed to cb by reference.
Fixed bug #12776.
2002-12-04 16:41:28 +00:00
Moriyoshi Koizumi 242ddba326 Fixed leaks in array_walk() 2002-12-03 15:02:06 +00:00
Moriyoshi Koizumi 98dace883e Improved the error reporting portion of array_walk() as suggested by Markus 2002-11-26 22:12:40 +00:00
Moriyoshi Koizumi 3fd513f32a Prevent too many error reports from being displayed 2002-11-26 21:51:37 +00:00
Moriyoshi Koizumi 61b3d5ccb5 Fixed incorrect error messages of array_walk() in case the callback is
specified in an array form
2002-11-26 21:21:32 +00:00
Moriyoshi Koizumi 44c98c7e3f Fixed some odd behaviours of range() 2002-11-23 11:27:56 +00:00
Moriyoshi Koizumi fb20eae7fc Fixed bug #20381 2002-11-15 02:16:41 +00:00
Jon Parise 92df58dab6 @- Added an optional "step" parameter to range(). (Jon) 2002-11-14 05:46:10 +00:00
John Coggeshall 253cecd43a Added GLOB_ONLYDIR and GLOB_BRACE for compatiable systems for the glob()
function.

Modified the layout and some minor logic in the experimental webHarness()
test class

Added Whitespace accidently to array.c :)
2002-11-13 13:31:33 +00:00
Ilia Alshanetsky 6d57337cda Fixed a memory leak in array_fill().
The refcount hack is now done for ZE1 only and is slightly faster then the
original.
After this patch array_fill() can consistently create arrays with >65k elements.
2002-11-05 16:19:19 +00:00
Sterling Hughes f61889e72d revert patch 2002-10-10 19:24:45 +00:00
Sterling Hughes 2c4aa71d32 clean these functions up using zend_parse_parameters and nuke the use of
HASH_OF() which is inappropriate in these cases...
2002-10-09 18:29:45 +00:00
Sterling Hughes 521a9bdadc small cleanups... 2002-10-09 17:15:56 +00:00
Andrey Hristov 9ee1ce156f ws fixes.
#hope not to be flamed :)  what a wonderful day.
2002-09-21 16:10:33 +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 23d3cd79c1 Fixing my zts fix.
#Sorry Edin
2002-09-12 08:20:37 +00:00