History log of /php-src/ext/standard/basic_functions.c (Results 26 – 50 of 1635)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 6f2f228e 02-Sep-2022 Máté Kocsis

Declare ext/standard constants in stubs - part 5

Closes GH-9466


# 64b962b2 02-Sep-2022 Máté Kocsis

Declare ext/standard constants in stubs - part 4

Closes GH-9465


Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23
# ef72d533 26-Aug-2022 Máté Kocsis

Declare ext/standard constants in stubs - part 3 (#9427)

Revision tags: php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3, php-8.2.0beta2, php-8.1.9, php-8.0.22, php-8.1.9RC1, php-8.2.0beta1, php-8.0.22RC1
# 4d8dd8d2 19-Jul-2022 Go Kudo

Implement Random Extension

https://wiki.php.net/rfc/rng_extension
https://wiki.php.net/rfc/random_extension_improvement

# 492af9f8 10-Jul-2022 Dennis Snell

Add ini_parse_quantity function to convert ini quantities shorthand notation to int (#8454)

Revision tags: php-8.0.21, php-8.1.8, php-8.2.0alpha3
# dfbb4252 04-Jul-2022 David Carlier

Use `safe_*erealloc*` flavor in few places to mitigate possible overflows.

Revision tags: php-8.1.8RC1, php-8.2.0alpha2, php-8.0.21RC1
# efc8f0eb 17-Jun-2022 Arnaud Le Blanc

Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951)

Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi()

zend_atol() and zend_atoi() don't just do number p

Deprecate zend_atol() / add zend_ini_parse_quantity() (#7951)

Add zend_ini_parse_quantity() and deprecate zend_atol(), zend_atoi()

zend_atol() and zend_atoi() don't just do number parsing.
They also check for a 'K', 'M', or 'G' at the end of the string,
and multiply the parsed value out accordingly.

Unfortunately, they ignore any other non-numerics between the
numeric component and the last character in the string.
This means that numbers such as the following are both valid
and non-intuitive in their final output.

* "123KMG" is interpreted as "123G" -> 132070244352
* "123G " is interpreted as "123 " -> 123
* "123GB" is interpreted as "123B" -> 123
* "123 I like tacos." is also interpreted as "123." -> 123

Currently, in php-src these functions are used only for parsing ini values.

In this change we deprecate zend_atol(), zend_atoi(), and introduce a new
function with the same behavior, but with the ability to report invalid inputs
to the caller. The function's name also makes the behavior less unexpected:
zend_ini_parse_quantity().

Co-authored-by: Sara Golemon <pollita@php.net>

show more ...

Revision tags: php-8.0.20, php-8.1.7, php-8.2.0alpha1, php-7.4.30
# debd38f8 02-Jun-2022 Máté Kocsis

Add support for sensitive parameters in stubs

Revision tags: php-8.1.7RC1, php-8.0.20RC1
# 14da1cb90 22-May-2022 Máté Kocsis

Add support for class constants in stubs (#7434)

Revision tags: php-8.1.6, php-8.0.19, php-8.1.6RC1, php-8.0.19RC1, php-8.0.18, php-8.1.5, php-7.4.29, php-8.1.5RC1, php-8.0.18RC1, 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, 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, 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, php-8.1.0beta1, php-7.4.22RC1, php-8.0.9RC1, php-8.1.0alpha3, php-7.4.21, php-7.3.29, php-8.0.8, php-8.1.0alpha2, php-7.4.21RC1, php-8.0.8RC1, php-8.1.0alpha1, php-8.0.7, php-7.4.20, php-8.0.7RC1, php-7.4.20RC1, 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, php-7.4.11, php-7.3.23, php-8.0.0beta4, php-7.4.11RC1, php-7.3.23RC1, php-8.0.0beta3, php-7.4.10, php-7.3.22, php-8.0.0beta2, php-7.3.22RC1, php-7.4.10RC1, php-8.0.0beta1, php-7.4.9, php-7.2.33, php-7.3.21, php-8.0.0alpha3, php-7.4.9RC1, php-7.3.21RC1, php-7.4.8, php-7.2.32, php-8.0.0alpha2, php-7.3.20, php-8.0.0alpha1, php-7.4.8RC1, php-7.3.20RC1, php-7.4.7, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1
# 5171cb43 20-May-2020 George Peter Banyard

Fix [-Wundef] warnings in standard extension

# e32642c5 05-Dec-2021 Nikita Popov

Merge branch 'PHP-8.1'

* PHP-8.1:
Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default


# 26e42446 09-Nov-2021 Nikita Popov

Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default

Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the defaul

Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default

Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.

Closes GH-7635.

show more ...

# 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 ...

# fabcc9a3 11-Oct-2021 Nikita Popov

Fix long-term shutdown/tick fci/fcc storage

Normally incrementing the refcount on just function_name is
sufficient. However, if the callable is of the form 'X::y' inside
an instance

Fix long-term shutdown/tick fci/fcc storage

Normally incrementing the refcount on just function_name is
sufficient. However, if the callable is of the form 'X::y' inside
an instance method, this will capture $this in fcc.object, which
also needs to be retained.

The fci_addref/fci_release helpers should likely be exported as
a general API, as we may have this problem in other places as
well.

Fixes oss-fuzz #39778.

show more ...

# 51a504c8 27-Aug-2021 Nikita Popov

Avoid string copy in get_cfg_var()

basic_functions.c already has a macro for returning an ini
value to userland, so make use of it for get_cfg_var() as well,
after generalizing it to

Avoid string copy in get_cfg_var()

basic_functions.c already has a macro for returning an ini
value to userland, so make use of it for get_cfg_var() as well,
after generalizing it to not write to return_value in particular.

show more ...

# ef5558a8 17-Aug-2021 Nikita Popov

Use zend_string for putenv key (#7379)

A zend_string will be created anyway for the hash key,
so we may as well create one in the first place.

# b56699b8 17-Aug-2021 Nikita Popov

Use system allocator for putenv value

The putenv value is stored in environ. If for some reason we
fail to restore it on shutdown, make sure that we fail gracefully
by using a system

Use system allocator for putenv value

The putenv value is stored in environ. If for some reason we
fail to restore it on shutdown, make sure that we fail gracefully
by using a system allocated value, rather than a ZMM allocated one.

This is an additional mitigation for bug #81316 style issues if
all else fails.

show more ...

# aff36587 29-Jun-2021 Patrick Allaert

Fixed some spaces used instead of tabs

# e7135cb8 14-May-2021 George Peter Banyard

Use zend_string_equals_* API in a couple of more place

Closes GH-6979

# 4f46bec5 10-May-2021 Nikita Popov

Initialize zpp varargs variables

These are not initialized if no args are passed.

# 39fa55a4 10-May-2021 Aaron Piotrowski

Switch register_tick_function back to zend_parse_parameters

No reason to use fast ZPP in register_tick_function, so let’s keep the binary size down just a bit.

# a9695cc6 10-May-2021 George Peter Banyard

Refactor register shutdown function mechanism

Use FCI/FCC structure instead of custom implementation which does the same.
This also fixes the "bug" which prevented static methods from be

Refactor register shutdown function mechanism

Use FCI/FCC structure instead of custom implementation which does the same.
This also fixes the "bug" which prevented static methods from being shutdown functions.

Closes GH-5829

Co-authored-by: Aaron Piotrowski <aaron@trowski.com>

show more ...

# 66bfad57 09-May-2021 Aaron Piotrowski

Remove unnecessay NULL

Z_PARAM_FUNC already sets params to NULL.

# 0189585c 09-May-2021 Aaron Piotrowski

Fix tick function with arguments

Tick function arguments need to be copied to fci params.

# 7ec048f9 09-May-2021 Aaron Piotrowski

Do not free tick function entry

This memory is freed by zend_llist.

12345678910>>...66