#
5feb29ea |
| 17-Sep-2024 |
David Carlier |
Fix ubsan build on freebsd regarding float. due to the system header machine/ieeefp.h proceeding to a bitshift operation. close GH-15935
|
#
a2068ef4 |
| 22-Dec-2023 |
David Carlier |
Fix GH-12999: zend_strnlen build fix when platform misses strnlen support. fix from @rainerjung
|
#
736032fe |
| 17-Oct-2023 |
SakiTakamachi |
Fixed a bug in zend_memnistr with single character needle Fixes GH-12457 Closes GH-12458
|
#
782ffd76 |
| 22-Aug-2023 |
Cristian Rodríguez |
Use a single version of strnlen (#12015) * Zend: Make zend_strnlen available for use outside zend_compile * exif: remove local php_strnlen, use zend_strnlen instead * main
Use a single version of strnlen (#12015) * Zend: Make zend_strnlen available for use outside zend_compile * exif: remove local php_strnlen, use zend_strnlen instead * main: remove local strnlen, use zend_strnlen instead * phar: remove local strnlen, use zend_strnlen
show more ...
|
#
d8696f92 |
| 17-Jul-2023 |
George Peter Banyard |
[RFC] Path to Saner Increment/Decrement operators (#10358) * Add behavioural tests for incdec operators * Add support to ++/-- for objects castable to _IS_NUMBER * Add str_
[RFC] Path to Saner Increment/Decrement operators (#10358) * Add behavioural tests for incdec operators * Add support to ++/-- for objects castable to _IS_NUMBER * Add str_increment() function * Add str_decrement() function RFC: https://wiki.php.net/rfc/saner-inc-dec-operators Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
show more ...
|
#
ea8f934f |
| 19-Jun-2023 |
George Peter Banyard |
Zend: Expose zendi_try_get_long() function via a public API (#10175)
|
#
706a9b2a |
| 04-Apr-2023 |
Dmitry Stogov |
Revert "Zend/zend_types.h: move `zend_result` to separate header (#10609)" This reverts commit 3bce11606937de8227dac6512d2abf163dc0e8fa.
|
#
3b066188 |
| 07-Mar-2023 |
George Peter Banyard |
RFC: Saner array_(sum|product)() (#10161) RFC: https://wiki.php.net/rfc/saner-array-sum-product Moreover, the internal fast_add_function() function was removed.
|
#
d5c649b3 |
| 23-Feb-2023 |
Max Kellermann |
zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621) `zend_uchar` suggests that the value is an ASCII character, but here, it's about very small integers. This is misleadi
zend_compiler, ...: use `uint8_t` instead of `zend_uchar` (#10621) `zend_uchar` suggests that the value is an ASCII character, but here, it's about very small integers. This is misleading, so let's use a C99 integer instead. On all architectures currently supported by PHP, `zend_uchar` and `uint8_t` are identical. This change is only about code readability.
show more ...
|
#
49c1e6eb |
| 20-Feb-2023 |
Max Kellermann |
Make various pointers const in Zend/ (#10608) * Zend/zend_operators: pass const pointers to zend_is_identical() * Zend/zend_operators: pass const pointers to zend_get_{long,double}(
Make various pointers const in Zend/ (#10608) * Zend/zend_operators: pass const pointers to zend_is_identical() * Zend/zend_operators: pass const pointers to zend_get_{long,double}() * Zend/Optimizer/sccp: make pointers const * Zend/Optimizer/scdf: make pointers const * Zend/Optimizer/zend_worklist: make pointers const * Zend/Optimizer/zend_optimizer: make pointers const * Zend/zend_compile: make pointers const
show more ...
|
#
3bce1160 |
| 20-Feb-2023 |
Max Kellermann |
Zend/zend_types.h: move `zend_result` to separate header (#10609) Many sources need just `zend_result`, and with this new header, they only need to include `zend_result.h` instead of `ze
Zend/zend_types.h: move `zend_result` to separate header (#10609) Many sources need just `zend_result`, and with this new header, they only need to include `zend_result.h` instead of `zend_types.h`; the latter is large and has fat dependencies, which slows down the build.
show more ...
|
#
c8955c07 |
| 16-Jan-2023 |
Christoph M. Becker |
Revert GH-10220 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit ecc880f491d66081298a16634629f149459706a9. This reverts commit 588a07
Revert GH-10220 Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>. This reverts commit ecc880f491d66081298a16634629f149459706a9. This reverts commit 588a07f7371ee2b5fac17de147926780e427fae6. This reverts commit f377e15751d3aa48b69cd9bcc366ede7803d511f. This reverts commit b4ba16fe189b109144aff669e11d81365160104b. This reverts commit 694ec1deea36e366b28b6349a52be49824e1a1a8. This reverts commit 6b34de8eba9f66882ae16e6073af28783670ac53. This reverts commit aa1cd02a4367834026ea2205ea13a2f904455aa1. This reverts commit 308fd311ea6fcf3094b448df7f2b264f08e4fe4f. This reverts commit 16203b53e1822a37b6ba6f2ab198bb435d05fdad. This reverts commit 738fb5ca5412f5e833a7fab82b11519e635a3357. This reverts commit 9fdbefacd3c382d731aa175b7bdc002ec9cb2b30. This reverts commit cd4a7c1d90562ebb5f89caf94d00d579631b9fbe. This reverts commit 928685eba2b2f0ded90e7f78fd806ea164002f6e. This reverts commit 01e5ffc85cd4357fd7b5b7ceefa29f2d10ca26b7.
show more ...
|
#
694ec1de |
| 04-Jan-2023 |
Max Kellermann |
Zend/zend_{operators,variables}: include cleanup
|
#
a8eb399c |
| 03-Jan-2023 |
Max Kellermann |
Zend/zend_operators: make several pointers const
|
Revision tags: php-8.2.0RC1, php-8.1.10, php-8.0.23, php-8.0.23RC1, php-8.1.10RC1, php-8.2.0beta3 |
|
#
3725717d |
| 04-Aug-2022 |
Go Kudo |
Remove ZEND_DVAL_TO_LVAL_CAST_OK (#9215) * Remove ZEND_DVAL_TO_LVAL_CAST_OK As far as I can see, this operation should always use the _slow method, and the results seem to be wrong when
Remove ZEND_DVAL_TO_LVAL_CAST_OK (#9215) * Remove ZEND_DVAL_TO_LVAL_CAST_OK As far as I can see, this operation should always use the _slow method, and the results seem to be wrong when ZEND_DVAL_TO_LVAL_CAST_OK is enabled. * update NEWS
show more ...
|
#
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 ...
|
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, php-8.0.21, php-8.1.8, php-8.2.0alpha3, 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, php-8.1.7RC1, php-8.0.20RC1, 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 |
|
#
7b90ebeb |
| 05-Feb-2022 |
Tyson Andre |
Fix `-Werror=sign-compare` warning in `zend_memnistr` (#8042) `error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Werro
Fix `-Werror=sign-compare` warning in `zend_memnistr` (#8042) `error: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘long int’ [-Werror=sign-compare]` This is asserting `end >= haystack` as a precondition for callers (in debug builds) and existing callers are correct. An alternate option is to cast the left side to `int64_t`, but that may be slightly inefficient for 32-bit builds.
show more ...
|
Revision tags: php-8.1.3RC1, php-8.0.16RC1, php-8.1.2, php-8.0.15, php-8.1.2RC1, php-8.0.15RC1 |
|
#
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 ...
|
Revision tags: 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 |
|
#
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 ...
|
#
067df263 |
| 24-Nov-2021 |
Dmitry Stogov |
Use memrchr() when available On x86_64 glibc memrchr() uses SSE/AVX CPU extensions and works much faster then naive loop. On x86 32-bit we still use inlined version. memrchr() i
Use memrchr() when available On x86_64 glibc memrchr() uses SSE/AVX CPU extensions and works much faster then naive loop. On x86 32-bit we still use inlined version. memrchr() is a GNU extension. Its prototype becomes available when <string.h> is included with defined _GNU_SOURCE macro. Previously, we defined it in "php_config.h", but some sources may include <string.h> befire it. To avod mess we also pass -D_GNU_SOURCE to C compiler.
show more ...
|
#
c7484ef9 |
| 10-Nov-2021 |
Dmitry Stogov |
zend_memnstr() micro-optimization
|
Revision tags: 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 |
|
#
da0c7050 |
| 29-Sep-2021 |
Tim Starling |
Add upper case functions to zend_operators.c and use them (#7521) Add a family of upper case conversion functions to zend_operators.c, by analogy with the lower case functions.
Add upper case functions to zend_operators.c and use them (#7521) Add a family of upper case conversion functions to zend_operators.c, by analogy with the lower case functions. Move the single-character conversion macros to the header so that they can be used as a locale-independent replacement for tolower() and toupper(). Factor out the ugly bits of the SSE2 case conversion so that the four functions that use it are easy to read and processor-independent. Use the new ASCII upper case functions in ext/xml, ext/pdo_dblib and as an optimization for strtoupper() when the locale is "C".
show more ...
|
Revision tags: php-8.1.0RC3 |
|
#
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 ...
|
Revision tags: php-8.0.11, php-7.4.24, php-7.3.31 |
|
#
7968ce93 |
| 16-Sep-2021 |
Nikita Popov |
Remove unnecessary const qualifier To fix -Wignored-qualifiers warning.
|