History log of /php-src/ext/spl/spl_array.c (Results 26 – 50 of 520)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
Revision tags: php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4df3dd76 08-Jul-2022 Arnaud Le Blanc

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend

Reduce memory allocated by var_export, json_encode, serialize, and other (#8902)

smart_str uses an over-allocated string to optimize for append operations. Functions that use smart_str tend to return the over-allocated string directly. This results in unnecessary memory usage, especially for small strings.

The overhead can be up to 231 bytes for strings smaller than that, and 4095 for other strings. This can be avoided for strings smaller than `4096 - zend_string header size - 1` by reallocating the string.

This change introduces `smart_str_trim_to_size()`, and calls it in `smart_str_extract()`. Functions that use `smart_str` are updated to use `smart_str_extract()`.

Fixes GH-8896

show more ...

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3
# 3b92a966 25-Jun-2022 Ilija Tovilo

Convert return type of various object handlers from int to zend_result (#8755)

Revision tags: php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1, php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30, php-8.1.7RC1, php-8.0.20RC1, php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1
# 3de0ccfe 15-Apr-2022 Christoph M. Becker

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix GH-8366: ArrayIterator may leak when calling __construct()


# 549cf3a2 15-Apr-2022 Christoph M. Becker

Merge branch 'PHP-8.0' into PHP-8.1

* PHP-8.0:
Fix GH-8366: ArrayIterator may leak when calling __construct()


# 1762a879 14-Apr-2022 Christoph M. Becker

Fix GH-8366: ArrayIterator may leak when calling __construct()

When we detach an iterator, we also have to delete it.

Closes GH-8374.

# cfc38a60 13-Apr-2022 George Peter Banyard

SPL: minor refactoring (#8341)

Use more appropriate types and return macros

Revision tags: php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1
# db0db220 23-Mar-2022 George Peter Banyard

Use zend_result/bool in spl_array.c

# 2fa33d1d 23-Mar-2022 George Peter Banyard

Use ZEND_THROWS() where applicable in spl_array.c

# 69ea2d86 16-Mar-2022 George Peter Banyard

Convert check + exception to assertion

Move the inside the __unserialize() method as that's the only one which now needs this check

Closes GH-8207

Revision tags: php-8.1.4, php-8.0.17, php-8.1.4RC1, php-8.0.17RC1, php-8.1.3, php-8.0.16, php-7.4.28, php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1, php-8.0.14, php-8.1.1, php-7.4.27, php-8.1.1RC1, php-8.0.14RC1, php-7.4.27RC1, php-8.1.0, php-8.0.13, php-7.4.26, php-7.3.33, php-8.1.0RC6, php-7.4.26RC1, php-8.0.13RC1, php-8.1.0RC5, php-7.3.32, php-7.4.25, php-8.0.12, php-8.1.0RC4, php-8.0.12RC1, php-7.4.25RC1, php-8.1.0RC3
# f13c22fb 24-Sep-2021 Nikita Popov

Remove unnecessary zend_user_iterator use in spl_array

We no longer use any functionality of zend_user_iterator here.

# 15bbf6f3 24-Sep-2021 Nikita Popov

Automatically determine whether to reuse get_iterator()

Same as with the IteratorAggregate case, allow reusing get_iterator
if none of the Iterator methods are overridden. Drop the
R

Automatically determine whether to reuse get_iterator()

Same as with the IteratorAggregate case, allow reusing get_iterator
if none of the Iterator methods are overridden. Drop the
REUSE_GET_ITERATOR flag that previously allowed ArrayIterator to
opt-in to unconditional get_iterator reuse, and drop the override
handling it did, in favor of the automated approach.

show more ...

# d0dbf729 24-Sep-2021 Nikita Popov

Initialize iterator_funcs_ptr upfront

Same as we do for the IteratorAggregate case, initialize the
Iterator methods upfront. This is preparation for an upcoming
change to automatical

Initialize iterator_funcs_ptr upfront

Same as we do for the IteratorAggregate case, initialize the
Iterator methods upfront. This is preparation for an upcoming
change to automatically determine whether get_iterator can be
reused in a child class, in the same way we already do for
IteratorAggregate.

show more ...

Revision tags: php-8.0.11, php-7.4.24, php-7.3.31, php-8.1.0RC2, php-7.4.24RC1, php-8.0.11RC1, php-8.1.0RC1
# 5b2ddf5a 31-Aug-2021 Nikita Popov

Export zend_use_resource_as_offset()

Use a common implementation to generate this error message, as
we do so in quite a few places dealing with array keys.

Revision tags: php-7.4.23, php-8.0.10, php-7.3.30, php-8.1.0beta3, php-8.0.10RC1, php-7.4.23RC1, php-8.1.0beta2, php-8.0.9, php-7.4.22
# 6d505d44 22-Jul-2021 Nikita Popov

Add RETURN/RETVAL_COPY_DEREF() macros

These were missing from the set...

I think quite a few of these usages don't actually need the DEREF,
but I've just kept things as is for n

Add RETURN/RETVAL_COPY_DEREF() macros

These were missing from the set...

I think quite a few of these usages don't actually need the DEREF,
but I've just kept things as is for now.

show more ...

Revision tags: php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3
# 54c4c7d7 06-Jul-2021 Nikita Popov

Merge branch 'PHP-8.0'

* PHP-8.0:
Fix ArrayObject::exchangeArray() return type


# bcefc31e4 06-Jul-2021 Nikita Popov

Fix ArrayObject::exchangeArray() return type

This method cannot return null.

Revision tags: php-7.4.21, php-7.3.29
# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

Revision tags: php-8.0.8, php-8.1.0alpha2
# ff114594 17-Jun-2021 George Peter Banyard

Refactor spl_array_has_dimension_ex()

Use early returns instead of else blocks
Add comments, especially to explain why we need a check_empty == 2 check

Revision tags: php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1
# 71fb8356 08-Jun-2021 Nikita Popov

Fix bug #80945: Don't throw undefined array key warning in ArrayObject unset()

This makes the behavior of ArrayObject the same as far plain
arrays, which don't throw a warning when unset

Fix bug #80945: Don't throw undefined array key warning in ArrayObject unset()

This makes the behavior of ArrayObject the same as far plain
arrays, which don't throw a warning when unsetting a key that
already doesn't exit.

show more ...

# 9d2a466c 09-Jun-2021 Nikita Popov

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_

Remove explicit assignments of zend_objects_destroy_object

This is the default handler, no need to set it explicitly. This
makes it easier to see which objects really have a custom dtor_obj.

show more ...

Revision tags: php-8.0.7, php-7.4.20
# b6958bb8 31-May-2021 George Peter Banyard

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <

Implement "Deprecate implicit non-integer-compatible float to int conversions" RFC. (#6661)

RFC: https://wiki.php.net/rfc/implicit-float-int-deprecate

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>

show more ...

Revision tags: php-8.0.7RC1, php-7.4.20RC1
# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...

Revision tags: php-8.0.6, php-7.4.19, php-7.4.18, php-7.3.28, php-8.0.5, php-8.0.5RC1, php-7.4.18RC1, php-8.0.4RC1, php-7.4.17RC1, php-8.0.3, php-7.4.16, php-8.0.3RC1, php-7.4.16RC1, php-8.0.2, php-7.4.15, php-7.3.27, php-8.0.2RC1, php-7.4.15RC2, php-7.4.15RC1, php-8.0.1, php-7.4.14, php-7.3.26, php-7.4.14RC1, php-8.0.1RC1, php-7.3.26RC1, php-8.0.0, php-7.3.25, php-7.4.13, php-8.0.0RC5, php-7.4.13RC1, php-8.0.0RC4, php-7.3.25RC1, php-7.4.12, php-8.0.0RC3, php-7.3.24, php-8.0.0RC2, php-7.4.12RC1, php-7.3.24RC1, php-7.2.34, php-8.0.0rc1
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments

# c28751c6 01-Mar-2021 Dmitry Stogov

Merge branch 'PHP-8.0'

* PHP-8.0:
Fixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT)


# 957cb13a 01-Mar-2021 Dmitry Stogov

Fixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT)

12345678910>>...21