#
25cdb3b8 |
| 18-Oct-2022 |
Jeremy Mikola |
[skip ci] Document zend_enum_get_case_by_value() function This function was introduced in d62d50b88ecf8ed838b20d48006a32277eb569fe. |
#
4af695e9 |
| 10-Sep-2022 |
Máté Kocsis |
Require PHP 7.4 at least for running the build system (#9519) |
#
f7d42f64 |
| 23-Aug-2022 |
Andreas Braun |
Update gen_stub to avoid compile errors on duplicate function names Closes GH-9406 |
#
ca011bbf |
| 17-Aug-2022 |
Christoph M. Becker |
Drop unsupported libxml2 2.10.0 symbols The Docbook parser module has been removed completely. Support for XPointer locations (ranges and points) is disabled by default, and will ev
Drop unsupported libxml2 2.10.0 symbols The Docbook parser module has been removed completely. Support for XPointer locations (ranges and points) is disabled by default, and will eventually be removed completely. Given that the maintainer comments on the latter: "Be warned that this part of the code base is buggy and had many security issues in the past", it seems to be prudent to no longer build with XPointer locations support right away. To be able to build against libxml2 2.10.0, we remove the export definitions for Windows. Closes GH-9358.
show more ...
|
#
d0d6dae8 |
| 22-Aug-2022 |
George Peter Banyard |
Add a new zend API to check that strings don't have NUL bytes (#9375) Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de> |
#
98bdb7f9 |
| 12-Aug-2022 |
Ilija Tovilo |
Make pestr[n]dup infallible (#9295) Fixes GH-9128 Closes GH-9295 |
#
625f1649 |
| 20-Jul-2022 |
Bob Weinand |
Include internal functions in the observer API There are two main motivations to this: a) The logic for handling internal and userland observation can be unified. b) Unwinding of obs
Include internal functions in the observer API There are two main motivations to this: a) The logic for handling internal and userland observation can be unified. b) Unwinding of observed functions on a bailout does notably not include observers. Even if users of observers were to ensure such handling themselves, it would be impossible to retain the relative ordering - either the user has to unwind all internal observed frames before the automatic unwinding (zend_observer_fcall_end_all) or afterwards, but not properly interleaved. Signed-off-by: Bob Weinand <bobwei9@hotmail.com>
show more ...
|
#
af15923b |
| 08-Jun-2022 |
Rowan Tommins |
Extend deprecation notices to is_callable($foo) and callable $foo Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices so that uses of "self" and
Extend deprecation notices to is_callable($foo) and callable $foo Implements https://wiki.php.net/rfc/partially-supported-callables-expand-deprecation-notices so that uses of "self" and "parent" in is_callable() and callable type constraints now raise a deprecation notice, independent of the one raised when and if the callable is actually invoked. A new flag is added to the existing check_flags parameter of zend_is_callable / zend_is_callable_ex, for use in internal calls that would otherwise repeat the notice multiple times. In particular, arguments to internal function calls are checked first based on arginfo, and then again during ZPP, so the former suppresses the deprecation notice. Some existing tests which raised this deprecation have been updated to avoid the syntax, but the existing version retained for maximum regression coverage until it is made an error. With thanks to Juliette Reinders Folmer for the RFC and initial investigation. Closes GH-8823.
show more ...
|
#
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 ...
|
#
eacf6f43 |
| 08-Jul-2022 |
George Peter Banyard |
Add upgrading internals entry for fgetcsv() changes |
#
e2bd3b1e |
| 29-Apr-2022 |
Max Kellermann |
main/streams/plain_wrapper: skip lseek(SEEK_CUR) for newly opened files A file that has just been opened is known to be at offset zero, and the lseek(SEEK_CUR) system call to determine t
main/streams/plain_wrapper: skip lseek(SEEK_CUR) for newly opened files A file that has just been opened is known to be at offset zero, and the lseek(SEEK_CUR) system call to determine the current offset can be skipped. Closes #8540.
show more ...
|
#
3b92a966 |
| 25-Jun-2022 |
Ilija Tovilo |
Convert return type of various object handlers from int to zend_result (#8755) |
#
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 ...
|
#
2958c7cc |
| 08-Jun-2022 |
George Peter Banyard |
[skip ci] Add missing UPGRADING.INTERNALS entries |
#
d08451b2 |
| 29-May-2022 |
George Peter Banyard |
Replace php_stdint.h header with standard headers (#8613) |
#
b63df3ce |
| 24-May-2022 |
Levi Morrison |
Stop copying zend_module_entry (#8551) I did some historical digging and could not figure out why a copy is made. Additionally, the copy was not using the `.size` member, so it was p
Stop copying zend_module_entry (#8551) I did some historical digging and could not figure out why a copy is made. Additionally, the copy was not using the `.size` member, so it was probably wrong, but it's been that way for quite some time.
show more ...
|
#
28265508 |
| 18-May-2022 |
Levi Morrison |
Fix some minor warnings (#8568) * Fix php_apache_get_version prototype Avoids an error with -Werror=strict-prototypes when building the Apache SAPI. * Fix -Werror=strin
Fix some minor warnings (#8568) * Fix php_apache_get_version prototype Avoids an error with -Werror=strict-prototypes when building the Apache SAPI. * Fix -Werror=stringop-truncation in pdo_raise_impl_error * Note pdo_error_type BC break
show more ...
|
#
71a110fc |
| 13-Mar-2022 |
George Peter Banyard |
Remove strnatcmp_ex() wrappers These APIs always returned SUCCESS. Closes GH-8195 |
#
2f529569 |
| 29-Dec-2021 |
Ilija Tovilo |
Optimize stripos/stristr Closes GH-7847 Closes GH-7852 Previously stripos/stristr would lowercase both the haystack and the needle to reuse strpos. The approach in this PR i
Optimize stripos/stristr Closes GH-7847 Closes GH-7852 Previously stripos/stristr would lowercase both the haystack and the needle to reuse strpos. The approach in this PR is similar to strpos. memchr is highly optimized so we're using it to search for the first character of the needle in the haystack. If we find it we compare the remaining characters of the needle manually. The new implementation seems to perform about half as well as strpos (as two memchr calls are necessary to find the next candidate).
show more ...
|
#
da684582 |
| 09-Dec-2021 |
George Peter Banyard |
ZEND_INIT_FCALL is only produced when function exists at compile time (#7728) |
#
1afe89f8 |
| 21-Oct-2021 |
George Peter Banyard |
Remove (ZEND_)WRONG_PARAM_COUNT_WITH_RETVAL macros A TypeError is always emitted therefore assigning a retval is pointless and incorrect. |
#
49867405 |
| 24-Sep-2021 |
Nikita Popov |
Remove zend_binary_zval_strcasecmp() APIs These are thin wrappers ... around the wrong functions. They call the "_l()" version of the underlying APIs. For clarify, just call the wrap
Remove zend_binary_zval_strcasecmp() APIs These are thin wrappers ... around the wrong functions. They call the "_l()" version of the underlying APIs. For clarify, just call the wrapped API directly.
show more ...
|
#
1c33ddb5 |
| 31-Aug-2021 |
Patrick Allaert |
Prepare for PHP 8.2 |
#
14f599ea |
| 31-Aug-2021 |
Nikita Popov |
Use zend_long for resource ID Currently, resource IDs are limited to 32-bits. As resource IDs are not reused, this means that resource ID overflow for long-running processes is very
Use zend_long for resource ID Currently, resource IDs are limited to 32-bits. As resource IDs are not reused, this means that resource ID overflow for long-running processes is very possible. This patch switches resource IDs to use zend_long instead, which means that on 64-bit systems, 64-bit resource IDs will be used. This makes resource ID overflow practically impossible. The tradeoff is an 8 byte increase in zend_resource size. Closes GH-7436.
show more ...
|
#
00c668a1 |
| 08-Aug-2021 |
Joe Watkins |
Drop TsHashTable (#7351) |