History log of /PHP-8.2/Zend/zend_hash.h (Results 1 – 25 of 296)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# faa83f2f 04-Aug-2022 George Peter Banyard

Convert some macros to zend_always_inline functions (#8288)

This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with P

Convert some macros to zend_always_inline functions (#8288)

This doesn't have an effect really, but humans and IDEs can struggle to see through the macro soup when they first interact with PHP's source code.

Moreover, this reduces some of the macro expansion hell when they appear in compiler warnings.

show more ...

# bdf5a4e4 13-May-2021 George Peter Banyard

The hashvalue/index of a bucket is a zend_ulong

# 75a9a5f3 11-Jul-2022 Tim Düsterhus

Add `zend_array_to_list()` (#8976)

* Add zend_array_to_list()

* Use `zend_array_to_list()` in `PHP_FUNCTION(array_values)`

# c2547ab7 20-Apr-2022 George Peter Banyard

Add some const qualifiers in zend_string/hash (#8304)

Co-authored-by: Levi Morrison <morrison.levi@gmail.com>

# a8b9dbc6 17-Nov-2021 Bob Weinand

Fix ZEND_HASH_REVERSE_FOREACH_PTR definition

# 90b7bde6 03-Nov-2021 Dmitry Stogov

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[

Use more compact representation for packed arrays.

- for packed arrays we store just an array of zvals without keys.
- the elements of packed array are accessible throuf as ht->arPacked[i]
instead of ht->arData[i]
- in addition to general ZEND_HASH_FOREACH_* macros, we introduced similar
familied for packed (ZEND_HASH_PACKED_FORECH_*) and real hashes
(ZEND_HASH_MAP_FOREACH_*)
- introduced an additional family of macros to access elements of array
(packed or real hashes) ZEND_ARRAY_ELEMET_SIZE, ZEND_ARRAY_ELEMET_EX,
ZEND_ARRAY_ELEMET, ZEND_ARRAY_NEXT_ELEMENT, ZEND_ARRAY_PREV_ELEMENT
- zend_hash_minmax() prototype was changed to compare only values

Because of smaller data set, this patch may show performance improvement
on some apps and benchmarks that use packed arrays. (~1% on PHP-Parser)

TODO:
- sapi/phpdbg needs special support for packed arrays (WATCH_ON_BUCKET).
- zend_hash_sort_ex() may require converting packed arrays to hash.

show more ...

# 8356da60 02-Aug-2021 Nikita Popov

Remove dynamic defs from methods as well

We need to remove DECLARE_FUNCTION + dynamic_defs for functions
defined in methods as well, not just for those declared in the
main script.

# 67b5d8fc 30-Jul-2021 Nikita Popov

Don't reverse class order during preloading

We don't guarantee any particular order, but this reduces test
failures under --preload that are sensitive to class order.

Add some Z

Don't reverse class order during preloading

We don't guarantee any particular order, but this reduces test
failures under --preload that are sensitive to class order.

Add some ZEND_HASH_FOREACH_*_FROM macros to allow skipping the
persistent classes while iterating in forward direction.

show more ...

# ae8647d9 20-Jul-2021 Levi Morrison

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(.

Remove leading underscore for _zend_hash_find_known_hash (#7260)

Convert zend_hash_find_ex(..., 1) to zend_hash_find_known_hash(...)
Convert zend_hash_find_ex(..., 0) to zend_hash_find(...)

Also add serializable changes to UPGRADING.INTERNALS summary

show more ...

# ceb6fa6d 18-Jun-2021 Patrick Allaert

Convert some recently introduced zend_bool to bool

As well as `scripts/dev/check_parameters.php` utility.

Cfr. 3e01f5afb1b52fe26a956190296de0192eedeec1

# e86bea8d 06-Apr-2021 Dmitry Stogov

Extend ZEND_HASH_FILL_* API with ZEND_HASH_FILL_GROW and use it to optimize get_declared_classes()

# 340013ad 19-Mar-2021 Dmitry Stogov

Add zend_hash_lookup() and zend_hash_index_lookup() functions.
Thet search for an element with given key/index and add an empty one (NULL), if no found.

Revision tags: php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1
# 13c430b1 04-Nov-2019 Dusk

Add array_is_list(array $array) function

This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the commu

Add array_is_list(array $array) function

This function tests if an array contains only sequential integer keys. While
list isn't an official type, this usage is consistent with the community usage
of "list" as an annotation type, cf.
https://psalm.dev/docs/annotating_code/type_syntax/array_types/#lists

Rebased and modified version of #4886

- Use .stub.php files
- Add opcache constant evaluation when argument is a constant
- Change from is_list(mixed $value) to array_is_list(array $array)

RFC: https://wiki.php.net/rfc/is_list

Co-Authored-By: Tyson Andre <tysonandre775@hotmail.com>
Co-Authored-By: Dusk <dusk@woofle.net>

Closes GH-6070

show more ...

# 3e01f5af 15-Jan-2021 Nikita Popov

Replace zend_bool uses with bool

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

Replace zend_bool uses with bool

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.

show more ...

# 87104292 10-Sep-2020 Remi Collet

fix zend_hash_get_current_key_type_ex proto

# 7be70c6b 10-Sep-2020 Remi Collet

fix zend_hash_get_current_key_ex proto

# 40e5238a 04-Sep-2020 twosee

Flesh out ZEND_HASH_REVERSE_FOREACH_* macros

Closes GH-6080.

# fa8d9b11 28-Aug-2020 George Peter Banyard

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functio

Improve type declarations for Zend APIs

Voidification of Zend API which always succeeded
Use bool argument types instead of int for boolean arguments
Use bool return type for functions which return true/false (1/0)
Use zend_result return type for functions which return SUCCESS/FAILURE as they don't follow normal boolean semantics

Closes GH-6002

show more ...

# 1b2ec73c 26-Aug-2020 George Peter Banyard

Drop various unused macros/APIs

Also convert_libmagic_pattern() to return a zend_string*

Closes GH-6029

# d3eeeb68 05-Jun-2020 Nikita Popov

Don't leak attributes on internal classes

Also add zend_hash_release() API to complement zend_array_release(),
because the latter is specific to non-persistent zval arrays.

# 718e55c3 06-May-2020 Nikita Popov

Add zend_array_release() function

To complement zend_string_release() and zend_object_release().

# 90db6f2c 24-Apr-2020 Levi Morrison

Add case insensitive find_ptr hash functions

- zend_hash_find_ptr_lc(ht, zend_string *key)
- zend_hash_str_find_ptr_lc(ht, const char *str, size_t len)

Note that zend_hash_str

Add case insensitive find_ptr hash functions

- zend_hash_find_ptr_lc(ht, zend_string *key)
- zend_hash_str_find_ptr_lc(ht, const char *str, size_t len)

Note that zend_hash_str_find_ptr_lc used to exist in zend_compile.c
as zend_hash_find_ptr_lc. When exporting this I figured it
was best to use the same conventions as the rest of zend_hash.h.

show more ...

# 7352213b 17-Apr-2020 Nikita Popov

Early return if variadic type check fails

Don't check all the remaining arguments after one check failed.
I don't think this makes an observable behavior difference,
because we alrea

Early return if variadic type check fails

Don't check all the remaining arguments after one check failed.
I don't think this makes an observable behavior difference,
because we already suppress duplicate exceptions in argument
type error reporting.

show more ...

# 33ef3d64 04-Mar-2020 Nikita Popov

Use separate typedef for bucket comparison function

Avoid performing the same casting dance inside each sort compare
function.

Revision tags: php-7.4.0RC5, php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3, php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1, php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2
# 84c4a4f1 24-Jun-2019 Andrey Gromov

Make zend_hash_rehash() a void function

It always succeeds.

Closes GH-4304.

12345678910>>...12