History log of /PHP-7.3/ext/standard/array.c (Results 101 – 125 of 848)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 00c2c3a4 01-Sep-2016 Márcio Almada

fix unintentional bc break with compact('this') behavior


Revision tags: php-7.1.0beta3, php-5.6.25
# 447e57a1 17-Aug-2016 Kalle Sommer Nielsen

Fixed 7.1 build, decls first please!


Revision tags: php-7.0.10
# 1e4cae28 17-Aug-2016 Kalle Sommer Nielsen

Seems like I did a bad merge earlier, this should make PHP-7.0 sync with 7.1/master properly now


# 9b783107 17-Aug-2016 Kalle Sommer Nielsen

Fix build as done in master in commit 040331c36462eac94308bbef3200ee11389ca444

The reason why we cannot use round() here, is that it does not come with the standard C library on Windows, I d

Fix build as done in master in commit 040331c36462eac94308bbef3200ee11389ca444

The reason why we cannot use round() here, is that it does not come with the standard C library on Windows, I don't think this affects other systems.

At the same time, also expose _php_math_round()

show more ...


# cf017ce1 08-Aug-2016 Nikita Popov

Fix array_column() packed hash initialization

FILL assumes enough space is alredy allocated -- do that. Note that
the used size is an upper bound, albeit a likely one.


Revision tags: php-7.1.0beta2, php-5.6.25RC1, php-7.0.10RC1
# 6d1f4732 03-Aug-2016 Xinchen Hui

It's packed array


# be00b4ed 03-Aug-2016 Xinchen Hui

Optmized array_rand


# 501d24f8 03-Aug-2016 Xinchen Hui

Optimized array_pad


# 81a7d528 02-Aug-2016 Xinchen Hui

Folder marks


# 70f79fd8 02-Aug-2016 Xinchen Hui

Optimized array_merge and cleanup


# e730c8fc 02-Aug-2016 Xinchen Hui

Optimized array_merge


# fea2042a 02-Aug-2016 Xinchen Hui

Optimized array_column (thanks to Benjamin Coutu)


# a15902fa 02-Aug-2016 Xinchen Hui

fixed IS_REFERENCE handling


# 4d919592 01-Aug-2016 Xinchen Hui

Optimized array_reverse


# 040331c3 30-Jul-2016 Kalle Sommer Nielsen

Fix ext/standard build with the recent fixes to array.c

This solution might not be canon, but it works by re-using _php_math_round() from math.c, since round() is not available
in the C+

Fix ext/standard build with the recent fixes to array.c

This solution might not be canon, but it works by re-using _php_math_round() from math.c, since round() is not available
in the C++98 Standard Library on Windows at least. At the same
time it seems like the symbol export for it was missing from
php_math.h.

show more ...


# 11e05092 29-Jul-2016 Nikita Popov

Fix memory unsafety in array_walk()

Fixes bugs #61967, #62607, #69068, #70713.

The primary changes are:
a) Use the ht_iterator mechanism to ensure safety not only if the

Fix memory unsafety in array_walk()

Fixes bugs #61967, #62607, #69068, #70713.

The primary changes are:
a) Use the ht_iterator mechanism to ensure safety not only if the
iterated array itself changes, but also if it is replaced (and
potentially destroyed) entirely. We use the same semantics for
behavior under modification as foreach-by-reference. In
particular, we advance to the next element before processing it.
If the iterated entity is exchanged we iterate the new one from
the start. If it is not an array/object we warn and abort.
b) Always create a reference to the current value. Previously the
code kept the value as a non-reference and updated it to the
reference value produced by the user callback. However this is
unsafe, as the array may have been reallocated in the meantime,
so the previous value pointer is no longer value.
c) Around a recursive walk, incref the reference containing the
array. This ensures that the location where the currently
iterated value is stored cannot be freed.

One problem I was not able to solve is that we cannot decrement
the apply count if the array is exchanged during a recursive walk.

show more ...


# 8a442a33 29-Jul-2016 Nikita Popov

Fix ref handling in array_merge/replace_recursive()

As usual, if the reference has rc=1 it really isn't a reference.


Revision tags: php-7.1.0beta1, php-5.6.24, php-7.0.9, php-5.5.38
# 3c3b8c83 20-Jul-2016 Xinchen Hui

Fixed bug #72622 (array_walk + array_replace_recursive create references from nothing)


# d91e2e47 18-Jul-2016 Nikita Popov

Increase array_rand() rehashing treshold

From 3/8 to 3/4. I was thinking in terms of nTableSize, where a
requirement > 1/2 is not tenable. However, we're actually working
with nNumUs

Increase array_rand() rehashing treshold

From 3/8 to 3/4. I was thinking in terms of nTableSize, where a
requirement > 1/2 is not tenable. However, we're actually working
with nNumUsed, in which case more than 1/4 tombstones should be
quite unusual.

show more ...


# f5452b2b 18-Jul-2016 Nikita Popov

Optimize the n=1 case of array_rand()


# bb1f8228 07-Jul-2016 Leigh

Use zend_bitset


Revision tags: php-5.6.24RC1
# 06607993 06-Jul-2016 Leigh

Improve array_rand distribution


Revision tags: php-7.1.0alpha3
# 6d6ef7aa 05-Jul-2016 Leigh

Alias rand to mt_rand


Revision tags: php-7.0.9RC1
# eb65db08 23-Jun-2016 Xinchen Hui

Use zend_sort in array_multisort (tests change is expected)


# adc95c51 23-Jun-2016 Dmitry Stogov

Fixed compilation warnings


12345678910>>...34