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

515 Commits

Author SHA1 Message Date
Lior Kaplan 49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui 0579e8278d bump year 2015-01-15 23:26:37 +08:00
Bob Weinand d5ddd2dbb2 Disable restrictions regarding arrays in constants at run-time.
For the discussion around it, see the thread on the mailing list:
http://www.mail-archive.com/internals@lists.php.net/msg68245.html
2014-07-30 17:57:07 +02:00
Bob Weinand 354ee12b73 Revert "Fix bug #67064 in a BC safe way"
This reverts commit 1a4a9eede5.

Conflicts:
	ext/standard/array.c
	ext/standard/tests/array/bug67064.phpt
2014-07-30 17:18:05 +02:00
Tjerk Meesters f925892920 Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5:
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
2014-07-30 18:27:29 +08:00
Tjerk Meesters e9967292c3 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Updated NEWS for #67693
  Fixed bug #67693 - incorrect push to the empty array
2014-07-30 18:17:13 +08:00
Tjerk Meesters da3add26cf Fixed bug #67693 - incorrect push to the empty array 2014-07-30 18:15:14 +08:00
Matteo Beccati df5551ba4f Fix bug #67433 SIGSEGV when using count() on an object implementing Countable 2014-06-13 13:14:12 +02:00
Bob Weinand a93e734f81 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-14 00:08:36 +02:00
Bob Weinand bf3edbada6 Merge branch 'PHP-5.4' into PHP-5.5 2014-04-13 23:03:53 +02:00
Bob Weinand beda5093b4 Reverted to 5a0da281e5
Discussion: http://news.php.net/php.cvs/76836
2014-04-13 23:01:31 +02:00
Bob Weinand fb99409f89 Merge branch 'PHP-5.5' into PHP-5.6 2014-04-13 19:27:43 +02:00
Bob Weinand eca0644e0a Merge branch 'PHP-5.4' into PHP-5.5 2014-04-13 19:25:07 +02:00
Bob Weinand 1a4a9eede5 Fix bug #67064 in a BC safe way
You can use an optional parameter now when implementing the Countable interface
to get the $mode passed to count().
2014-04-13 19:24:12 +02:00
Nikita Popov ad2ef3d97e Add only_integer_keys option to zend_hash_reindex
This allows to either do a full reindex, or only reindex the integer
keys.
2014-04-09 12:31:21 +02:00
Nikita Popov f485c84a14 Don't always separate splice replacement array
Only perform separation when a typecast is done. Avoids doing a
full hash copy in many cases.
2014-04-09 12:31:21 +02:00
Nikita Popov 22d3eb3117 Add zend_hash_splice
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.
2014-04-09 12:31:21 +02:00
Nikita Popov 1aa8719e32 Add zend_hash_reindex
The implementation differs from the original in array.c in that it
rehashes the hashtable in the same loop. This is approximately two
times faster (not counting the rare case of a purely associative
array).
2014-04-09 12:31:21 +02:00
Xinchen Hui c081ce628f Bump year 2014-01-03 11:08:10 +08:00
Xinchen Hui 47c9027772 Bump year 2014-01-03 11:06:16 +08:00
Xinchen Hui c0d060f5c0 Bump year 2014-01-03 11:04:26 +08:00
Nikita Popov dc4bf922d9 Allow $num=0 in array_fill()
Implemented request #49824.
2013-11-12 22:02:51 +01:00
Sherif Ramadan 98c9e56ef0 Merge branch 'pull-request/287'
Add ability to use array keys with array_filter().
This adds a third (optional) argument to array_filter() that will determine
what gets passed to the callback, the array key, value or both.
The third argument can be one of two constants: ARRAY_FILTER_USE_BOTH or,
ARRAY_FILTER_USE_KEY.
2013-10-30 09:36:19 -04:00
Dmitry Stogov b0f9768e02 Merge branch 'PHP-5.5'
* PHP-5.5:
  Improved performance of array_merge() by eliminating useless copying

Conflicts:
	NEWS
2013-10-28 13:47:37 +04:00
Dmitry Stogov 5c0890ba8a Improved performance of array_merge() by eliminating useless copying 2013-10-28 13:31:44 +04:00
Tjerk Meesters 75ba75e205 Using only two constants to signal use type intent. 2013-09-28 00:06:04 +08:00
datibbaw 0492145e58 added bitmask variation 2013-09-28 00:06:04 +08:00
datibbaw a88c7be88b added use_keys argument to array_filter() 2013-09-28 00:06:03 +08:00
Nikita Popov 47ee470992 Make use of direct returns in some places 2013-08-31 13:16:50 +02:00
Christopher Jones 39612afc72 Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings.

Conflicts:
	ext/dba/libinifile/inifile.c
2013-08-14 20:43:25 -07:00
Christopher Jones 9ad97cd489 Reduce (some) compile noise of 'unused variable' and 'may be used uninitialized' warnings. 2013-08-14 20:36:50 -07:00
Veres Lajos 4749457a49 HASH_KEY_NON_EXISTANT fix 2013-07-21 20:09:53 -07:00
Xinchen Hui c7b58e4967 Merge branch 'PHP-5.4' into PHP-5.5 2013-07-21 21:07:27 +08:00
Xinchen Hui 3380de9774 Fixed bug #65304 (Use of max int in array_sum) 2013-07-21 21:07:19 +08:00
Veres Lajos e9a95d78ef typo fixes 2013-07-15 00:23:03 -07:00
Veres Lajos 72085b0e5f typo fixes 2013-07-15 00:18:57 -07:00
Anatol Belski 168a5bb6df Merge branch 'PHP-5.4' into PHP-5.5
* PHP-5.4:
  fix uninitialized memory usage
2013-07-14 20:46:19 +02:00
Anatol Belski add0833681 fix uninitialized memory usage 2013-07-14 20:44:29 +02:00
David Soria Parra 139e9824ad Fix array_colum segfault
Separate zval to avoid gc from freeing
2013-05-15 14:42:39 +02:00
Sara Golemon 734e165d4e array_column() - Use entire subject array when NULL passed for second param.
This starts to look like array_values(), except that you can reindex the arrays
using the third parameter.
2013-04-22 16:19:21 -07:00
Sara Golemon 1a03bd5dee Allow array_column() to take -1 as a valid value in third param
Also do some cleanup and simplification to make this code more
readable in the long term.
2013-04-22 15:54:21 -07:00
Sara Golemon 7b34324f84 Fix handling of double keys in array_column
Also fix resource test to not localize __FILE__ to cwd.
2013-04-21 22:35:04 -07:00
Xinchen Hui d8a5f41a60 Fixed bug parameter is casted to string of array_column 2013-04-01 19:11:45 +08:00
David Soria Parra 0173c4bab0 Merge branch 'pull-request/257' into PHP-5.5
* 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()
2013-03-20 13:02:33 +01:00
Ben Ramsey f5bf1ba88f array_column: Fix compile-time warnings 2013-03-19 20:44:19 -05:00
Nikita Popov 28634bf603 Forgot to remove some now unused variables 2013-03-12 17:39:20 +01:00
Nikita Popov fcc6611de9 Add support for non-scalar Iterator keys in foreach
RFC: https://wiki.php.net/rfc/foreach-non-scalar-keys
2013-03-12 17:27:31 +01:00
Ben Ramsey 5bc2854b37 array_column: Implement ability to specify an index column 2013-01-11 16:58:31 -06:00
Ben Ramsey 94d5b2519a Cleaning up a memory leak. 2013-01-11 14:16:20 -06:00
Ben Ramsey 20ab30339d array_column: Adding test for IS_OBJECT and converting object to string 2013-01-11 14:16:19 -06:00