summaryrefslogtreecommitdiff
path: root/ext/standard/php_array.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace zend_bool uses with boolNikita Popov2021-01-151-1/+1
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Make sorting stableNikita Popov2020-06-251-0/+1
| | | | | | | | | | | | | | Make user-exposed sorts stable, by storing the position of elements in the original array, and using those positions as a fallback comparison criterion. The base sort is still hybrid q/insert. The use of true/false comparison functions is deprecated (but still supported) and should be replaced by -1/0/1 comparison functions, driven by the <=> operator. RFC: https://wiki.php.net/rfc/stable_sorting Closes GH-5236.
* Remove now unnecessary PHP_FUNCTION() declarationsNikita Popov2020-04-031-78/+0
|
* Use separate typedef for bucket comparison functionNikita Popov2020-03-041-1/+1
| | | | | Avoid performing the same casting dance inside each sort compare function.
* Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
| | | | Closes GH-4732.
* Remove year range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Future-proof email addresses...Zeev Suraski2018-11-011-2/+2
|
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* Add implementation and tests for new methods - array_key_first(array $a) ↵Enno Woortmann2018-07-171-0/+2
| | | | Returns the key of the first element or null - array_key_last(array $a) Returns the key of the last element or null
* year++Xinchen Hui2018-01-021-1/+1
|
* Refactored recursion pretectionDmitry Stogov2017-10-061-1/+1
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | Change array sorting implementation to avoid two level callbacks system.Dmitry Stogov2015-09-101-2/+1
| | | | | | | | Simplify zval comparion API.
* | switch to the unified globals accessor where appropriateAnatol Belski2015-07-291-5/+1
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | trailing whitespace removalStanislav Malyshev2015-01-101-3/+3
| |
* | Simplify array_splice()Dmitry Stogov2014-12-301-1/+0
| |
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-6/+6
| |
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-12-121-1/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: updated NEWS PowerPC64 support for add and sub with overflow check PowerPC64 support for operators with overflow check Fixed bug #68583 Crash in timeout thread Reduced size of zend_op on 64-bit systems. Make ZEND_INIT_FCALL keep predcalculted size of necessary stack space in opline->op1.num to avoid its recalculation on each execution. Removed unused variables Improved array_merge() and array_replace() (1-st array may be added using simple procedure). Replaced zendi_convert_to_long() with _zval_get_long_func() Moved zend_is_true() from zend_execute.h/zend_execute_API.c into zend_operators.h/zend_operators.c. Splited the most expensive part of inline i_zend_is_true() into a separate zend_object_is_true(). Replaced zendi_convert_to_long() with cals to zend_is_true(). Revert "Save one xor instr" Save one xor instr Conflicts: Zend/zend_execute_API.c
| * | Improved array_merge() and array_replace() (1-st array may be added using ↵Dmitry Stogov2014-12-111-1/+2
| | | | | | | | | | | | simple procedure).
* | | enable static tsrm ls cache in ext/standardAnatol Belski2014-10-051-1/+1
|/ /
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | master renames phase 1Anatol Belski2014-08-251-1/+1
| |
* | further fixes to ext/standardAnatol Belski2014-08-181-1/+1
| |
* | Merge mainstream 'master' branch into refactoringDmitry Stogov2014-04-261-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During merge I had to revert: Nikita's patch for php_splice() (it probably needs to be applyed again) Bob Weinand's patches related to constant expression handling (we need to review them carefully) I also reverted all our attempts to support sapi/phpdbg (we didn't test it anyway) Conflicts: Zend/zend.h Zend/zend_API.c Zend/zend_ast.c Zend/zend_compile.c Zend/zend_compile.h Zend/zend_constants.c Zend/zend_exceptions.c Zend/zend_execute.c Zend/zend_execute.h Zend/zend_execute_API.c Zend/zend_hash.c Zend/zend_highlight.c Zend/zend_language_parser.y Zend/zend_language_scanner.c Zend/zend_language_scanner_defs.h Zend/zend_variables.c Zend/zend_vm_def.h Zend/zend_vm_execute.h ext/date/php_date.c ext/dom/documenttype.c ext/hash/hash.c ext/iconv/iconv.c ext/mbstring/tests/zend_multibyte-10.phpt ext/mbstring/tests/zend_multibyte-11.phpt ext/mbstring/tests/zend_multibyte-12.phpt ext/mysql/php_mysql.c ext/mysqli/mysqli.c ext/mysqlnd/mysqlnd_reverse_api.c ext/mysqlnd/php_mysqlnd.c ext/opcache/ZendAccelerator.c ext/opcache/zend_accelerator_util_funcs.c ext/opcache/zend_persist.c ext/opcache/zend_persist_calc.c ext/pcre/php_pcre.c ext/pdo/pdo_dbh.c ext/pdo/pdo_stmt.c ext/pdo_pgsql/pgsql_driver.c ext/pgsql/pgsql.c ext/reflection/php_reflection.c ext/session/session.c ext/spl/spl_array.c ext/spl/spl_observer.c ext/standard/array.c ext/standard/basic_functions.c ext/standard/html.c ext/standard/mail.c ext/standard/php_array.h ext/standard/proc_open.c ext/standard/streamsfuncs.c ext/standard/user_filters.c ext/standard/var_unserializer.c ext/standard/var_unserializer.re main/php_variables.c sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg_bp.c sapi/phpdbg/phpdbg_frame.c sapi/phpdbg/phpdbg_help.c sapi/phpdbg/phpdbg_list.c sapi/phpdbg/phpdbg_print.c sapi/phpdbg/phpdbg_prompt.c
| * Merge branch 'PHP-5.5' into PHP-5.6Bob Weinand2014-04-141-0/+4
| |\
| | * Bump yearXinchen Hui2014-01-031-1/+1
| | |
| * | Add zend_hash_spliceNikita Popov2014-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This implements the original functionality of php_splice, but as an in-place operation, thus avoiding copying the HT. This is much faster (~10x) if the splice removes a small portion of the array and doesn't insert many elements.
* | | Use better data structures (incomplete)Dmitry Stogov2014-02-101-1/+1
|/ /
* | Bump yearXinchen Hui2014-01-031-1/+1
| |
* | Using only two constants to signal use type intent.Tjerk Meesters2013-09-281-1/+0
| |
* | added bitmask variationdatibbaw2013-09-281-0/+4
|/
* Merge branch 'pull-request/257' into PHP-5.5David Soria Parra2013-03-201-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pull-request/257: array_column: Fix compile-time warnings array_column: Removed array_pluck() alias array_column: Set array_pluck as an alias for array_column array_column: Implement ability to specify an index column Cleaning up a memory leak. array_column: Adding test for IS_OBJECT and converting object to string array_column: Using add_next_index_zval() at nikic's recommendation. array_column: Improved tests array_column: Cleaning up, as recommended in pull request #56 comments Fixing typo in test for array_column() Simplify the code and use zend_hash_next_index_insert() Adding test for columns not present in all rows for array_column(). Adding tests for the negative results of array_column() Implement new array function array_column()
| * Implement new array function array_column()Ben Ramsey2013-01-111-0/+1
| | | | | | | | | | array_column() returns the values of the specified column from a multi-dimensional array.
| * Happy New Year~Xinchen Hui2013-01-011-1/+1
| |
| * - Year++Felipe Pena2012-01-011-1/+1
| |
| * - Year++Felipe Pena2011-01-011-1/+1
| |
* | Happy New YearXinchen Hui2013-01-011-1/+1
| |
* | - Year++Felipe Pena2012-01-011-1/+1
| |
* | add support for SORT_NATURAL and SORT_FLAG_CASE in array sort functionsArpad Ray2011-08-291-0/+2
| |
* | - Year++Felipe Pena2011-01-011-1/+1
|/
* sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-031-1/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* MFH (DOC] Add array_replace/array_replace_recursive (Mett Wilmas)Johannes Schlüter2008-07-311-0/+3
|
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* - MFH from HEAD:Jani Taskinen2007-11-021-2/+9
| | | | | | | | | | | | . 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.
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|