#
93fb2c12 |
| 30-Jan-2023 |
Derick Rethans |
Bring minimum precision inline with spprintf The precision "minimum" for spprintf was changed in 3f23e6bca90545a180ac4dbc80712065b1281d74 with the cryptic comment "Enable 0 mode for
Bring minimum precision inline with spprintf The precision "minimum" for spprintf was changed in 3f23e6bca90545a180ac4dbc80712065b1281d74 with the cryptic comment "Enable 0 mode for echo/print". Since then the behaviour of spprintf and snprintf has not been the same. This results in some APIs handling precision differently than others, which then resulted in the following Xdebug issue: https://bugs.xdebug.org/view.php?id=2151 The "manpage" for snprinf says about precision: An optional precision, in the form of a period ('.') followed by an optional decimal digit string. Instead of a decimal digit string one may write "*" or "*m$" (for some decimal integer m) to specify that the precision is given in the next argument, or in the m-th argument, re‐ spectively, which must be of type int. If the precision is given as just '.', the precision is taken to be zero. A negative precision is taken as if the precision were omitted. However, the snprintf implementation never supported this "negative precision", which is what PHP's default setting is in PG(precision). However, in 3f23e6bca90545a180ac4dbc80712065b1281d74 spprintf was made to support this. Although this techinically can break BC, there is clearly a bug here, and I could not see any failing tests locally.
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 ...
|
#
e14fbc84 |
| 02-Aug-2021 |
Nikita Popov |
Remove FORMAT_CONV_MAX_PRECISION This used to be necessary in the past because the NUM_BUF_SIZE was set to 512, which is shorter than DOUBLE_MAX_LENGTH. Now the value is either DOUBL
Remove FORMAT_CONV_MAX_PRECISION This used to be necessary in the past because the NUM_BUF_SIZE was set to 512, which is shorter than DOUBLE_MAX_LENGTH. Now the value is either DOUBLE_MAX_LENGTH or larger (2048).
show more ...
|
#
d28f6e69 |
| 02-Aug-2021 |
Nikita Popov |
Move php_gcvt to zend_gcvt Also move PHP_DOUBLE_MAX_LENGTH to ZEND_DOUBLE_MAX_LENGTH. |
#
282abfed |
| 14-Jul-2021 |
George Peter Banyard |
Drop register keyword |
#
02e48d99 |
| 14-Jul-2021 |
George Peter Banyard |
Use standard 64bit signed int type |
#
97785545 |
| 14-Jul-2021 |
George Peter Banyard |
Use standard 64bit unsigned int type |
#
b901c052 |
| 14-Jul-2021 |
George Peter Banyard |
Refactor conversion function Use a size_t instead of int because it tracks the size of the string Cast to int to maintain the C stdlib API |
#
2bf68b3c |
| 14-Jul-2021 |
George Peter Banyard |
Remove unused macro |
#
5e4d727f |
| 14-Jul-2021 |
George Peter Banyard |
Use standard bool type instead of boolean_e |
#
10f416f5 |
| 14-Jul-2021 |
George Peter Banyard |
Use standard bool type instead of bool_int |
#
aff36587 |
| 29-Jun-2021 |
Patrick Allaert |
Fixed some spaces used instead of tabs |
#
0d6358f2 |
| 16-Jun-2021 |
Nikita Popov |
Drop support for printf p modifier To be conservative, cause a fatal error if the p modifier is encountered, in case this is still used by some extension. |
#
a1473aad |
| 10-Jun-2021 |
Nikita Popov |
Avoid make_printable_zval in snprintf Use zval_get_tmp_string() instead. |
#
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 ...
|
#
462da6e0 |
| 31-Mar-2021 |
Josh Soref |
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465
Fix spelling and grammar mistakes This PR corrects misspellings identified by the check-spelling action. The misspellings have been reported at jsoref@b6ba3e2#commitcomment-48946465 The action reports that the changes in this PR would make it happy: jsoref@602417c Closes GH-6822.
show more ...
|
#
5caaf40b |
| 29-Sep-2020 |
George Peter Banyard |
Introduce pseudo-keyword ZEND_FALLTHROUGH And use it instead of comments |
#
f91f7260 |
| 22-Apr-2020 |
George Peter Banyard |
Drop unnecessary stdint and inttypes header checks These are always available as of C99. Closes GH-5323 Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de> |
#
13178087 |
| 20-Jan-2020 |
George Peter Banyard |
Drop the custom 'v' format from snprintf custom implementation. Extensions should instead use the standard 's' format. Closes GH-5100 |
#
aaa1f90e |
| 15-Jan-2020 |
George Peter Banyard |
Drop the custom I length modifier from snprintf custom implementation. Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in php-src/Zend/ze
Drop the custom I length modifier from snprintf custom implementation. Extensions should rather use the ZEND_LONG_FMT, ZEND_ULONG_FMT and ZEND_XLONG_FMT macros defined in php-src/Zend/zend_long.h Closes GH-5089
show more ...
|
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, 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 |
|
#
5d6e923d |
| 24-Sep-2019 |
Gabriel Caruso |
Remove mention of PHP major version in Copyright headers Closes GH-4732. |
Revision tags: 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, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1 |
|
#
be36d922 |
| 12-Jun-2019 |
Nikita Popov |
Fix unused value warnings in snprintf.c |
Revision tags: php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16 |
|
#
e06836a1 |
| 24-Feb-2019 |
Peter Kokot |
Remove checks for locale.h, setlocale, localeconv The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used uncondition
Remove checks for locale.h, setlocale, localeconv The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used unconditionally. Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`, `HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in configure.ac [2] can be ommitted and simplifed. The bundled libmagic (file) has also been patched already in version 5.35 and up in upstream location so when it will be patched also in php-src the check for locale.h header is still left in the configure.ac and in windows headers definition file. [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 Omit the bundled libmagic files
show more ...
|
Revision tags: php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1 |
|
#
92ac598a |
| 22-Jan-2019 |
Peter Kokot |
Remove local variables This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly
Remove local variables This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
show more ...
|
#
0cf7de1c |
| 30-Jan-2019 |
Zeev Suraski |
Remove yearly range from copyright notice |