summaryrefslogtreecommitdiff
path: root/ext/standard/array.c
Commit message (Collapse)AuthorAgeFilesLines
* - Fix copyright notices with 2001Andi Gutmans2001-02-261-1/+1
|
* Adding php_rand() and php_srand(seed) as a wrapper around random, lrand48 ↵James Moore2001-02-221-12/+1
| | | | and rand.
* Fix memory leak.Andrei Zmievski2001-02-211-0/+2
|
* Changed default behavior of array_search to match in_arrayJason Greene2001-02-201-12/+3
| | | | | (strict was default on, and is now default off)
* Rename to array_search().Andrei Zmievski2001-02-201-5/+4
|
* Moved the core of in_array into the function php_search_array, which is ↵Jason Greene2001-02-201-11/+59
| | | | | | | | | | 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)
* For those lucky systems with both random() and *rand48(), the random()Jim Jagielski2001-02-061-6/+6
| | | | | family is the prefered choice. So if both exist, we now choose that.
* @- Fixed extract() to properly prefix numeric keys when EXTR_PREFIX_ALL isAndrei Zmievski2001-01-221-61/+86
| | | | | | | @ used. (Andrei) @- Added EXTR_PREFIX_INVALID flag to extract() to automatically prefix @ string keys that do not constitute valid variable names. (Andrei)
* @- Changed extract() to check that prefixed name is a valid one. (Andrei)Andrei Zmievski2001-01-081-36/+35
| | | | | | | | Changed extract() to check that prefixed name is a valid one. Optimized extract() a bit too. # It'd be nice if someone made regression tests for extract().
* @- Changed extract() to return the number of variables extracted. (Andrei)Andrei Zmievski2001-01-081-2/+6
|
* Hopefully solves some bad behavior in array_unique(), array_intersect()Stig Venaas2000-12-281-69/+21
| | | | | | | and array_diff(). Now using SORT_STRING instead of SORT_REGULAR @- Fixed misbehavior of array_unique(), array_intersect() and array_diff(); @ could in certain cases give wrong result or segfault (Stig Venaas)
* (PHP preg_replace) Fix to allow proper escaping of captured subpatternAndrei Zmievski2000-12-221-0/+6
| | | | | | references in the replacement string. (PHP array_sum) Check that argument is an array.
* Heads up people!Zeev Suraski2000-12-221-19/+12
| | | | | | Updated the get_current_key() API - the relevant authors, please take a look at the updated code and make sure it's ok...
* Make php_array_merge() an API function.Andrei Zmievski2000-12-111-7/+7
|
* The result of conv_z_macros and some manual conversion ofSascha Schumann2000-11-271-193/+190
| | | | | "return_value.*=.*IS_STRING" constructs to RETVAL_STRINGL.
* Fixed memory leak in array_diff and array_intersect, was introduced withStig Venaas2000-11-031-2/+0
| | | | | last change.
* Namespace protect mergesort (caused conflict on Darwin).Sascha Schumann2000-11-021-2/+2
|
* @- Fixed array_rand() to shuffle results when the number of requestedAndrei Zmievski2000-10-271-0/+7
| | | | | @ elements is the same as the number of elements in the array. (Andrei)
* Added array_sum() function.Andrei Zmievski2000-10-251-2/+37
|
* Fixed array_type_data_compare(). I want strings to always differ fromStig Venaas2000-10-221-3/+6
| | | | | numbers, but not say 7 and 7.0 to differ.
* Made array_unique use array_type_data_compare instead of array_data_compareStig Venaas2000-10-211-2/+2
|
* Added array_type_data_compare which is like array_data_compare butStig Venaas2000-10-211-61/+117
| | | | | | | compares type first. Also rewrote array_intersect and array_diff, so that the order is not changed. @- Made array_intersect and array_diff not alter order (Stig Venaas)
* - Change to Z_BVAL macroAndi Gutmans2000-09-191-1/+1
|
* - Fix warningsZeev Suraski2000-09-191-1/+1
| | | | | - Fix URL scanner startup crash
* Forgot to update proto.Andrei Zmievski2000-09-121-1/+1
|
* @- Added second argument to array_reverse() that indicatese whetherAndrei Zmievski2000-09-121-11/+23
| | | | | @ the original array keys should be preserved. (Andrei)
* @- Updated array_walk() to be able to accept array($obj, 'method')Andrei Zmievski2000-08-221-2/+9
| | | | | @ syntax for the walk function. (Andrei)
* typo fix in array_diff error message, fixes bug #6236Hartmut Holzgraefe2000-08-181-1/+1
|
* minor typo fix in protoHartmut Holzgraefe2000-08-181-1/+1
|
* ooops - theese new parameters are optionalHartmut Holzgraefe2000-08-041-6/+6
|
* added new second parameter to osrt functions in the protosHartmut Holzgraefe2000-08-041-6/+6
|
* Changed lots of PHP 3 licence headers to PHP 4, mainly in .h files.David Croft2000-07-241-1/+3
| | | | | | | | | 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.
* *** empty log message ***Andrei Zmievski2000-07-171-1/+1
|
* Updated comments.Andrei Zmievski2000-07-111-10/+10
|
* @- Improved array_multisort() to be able to specify sort type as well sortAndrei Zmievski2000-07-111-38/+70
| | | | | | @ order. Incidentally, it can be used to sort multi-dimensional arrays @ as well. (Andrei)
* Not every argument type is mixed.Egon Schmid2000-07-041-5/+5
|
* Missed a two liner.Egon Schmid2000-07-041-2/+1
|
* Oops, didn't mean to commit that.Andrei Zmievski2000-06-281-2/+2
|
* @- Added an optional parameter to preg_replace() that can be used toAndrei Zmievski2000-06-281-2/+2
| | | | | @ specify how many replacements to make. (Andrei)
* The second array_merge() is now array_merge_recursive().Egon Schmid2000-06-251-12/+11
|
* One more place.Andrei Zmievski2000-06-181-1/+1
|
* @- Modified in_array() to not touch array pointer. (Andrei)Andrei Zmievski2000-06-181-2/+3
|
* - Fix a couple of wranings in the FTP code and in parsedate.yZeev Suraski2000-06-171-2/+2
| | | | | | - Be safer with LC_MESSAGES - Align with the latest Zend change in call_user_function_ex()
* Forgot to set_compare_func in the new array functions, had only testedStig Venaas2000-06-111-0/+3
| | | | | with older source.
* Changed array_subtract to array_diffStig Venaas2000-06-101-2/+2
|
* Adding fuctions array_unique, array_intersect and array_subtract.Stig Venaas2000-06-101-0/+248
|
* - ARG_COUNT(ht) -> ZEND_NUM_ARGS() mega patchAndi Gutmans2000-06-051-61/+61
|
* \0 is part of they key, but not of the variableStanislav Malyshev2000-06-041-2/+2
|
* - Allow all functions that receive user-defined function callbacks to acceptZeev Suraski2000-06-031-3/+0
| | | | | | | | | an array that contains an object and a method name, in place of a function name, e.g. usort($array, array($obj, "ObjSort")) (I checked the code in array.c and basic_functions.c, other code which uses call_user_function() may still force the function_name argument to be of type IS_STRING, which prevents this feature from working - and is no longer necessary)
* @- Added third argument to in_array(). If it's true, then in_array()Andrei Zmievski2000-06-011-8/+15
| | | | | | | @ will use strict comparison instead of the default one. (Andrei) Fixes bug #4753