| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
In favor of AX_CHECK_COMPILE_FLAG(), which we bundle since at least
PHP 7.
Closes GH-5904.
|
| |
|
|
|
|
|
| |
As pointed out by Levi, this is unused, and we already changed
the signature of this function for PHP 8.
|
|
|
|
|
|
|
|
| |
uint32_t type for argument count
size_t for length of char*
zend_bool for a zval bool arg
Closes GH-5845
|
|
|
|
| |
[ci skip]
|
|
|
|
| |
Closes GH-5805
|
| |
|
|
|
|
| |
Closes GH-5798
|
| |
|
|
|
|
| |
Cf. <https://github.com/php/php-src/pull/3936>.
|
|
|
|
| |
This build configuration switch was removed in 3a19726bce.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Userland classes that implement Traversable must do so either
through Iterator or IteratorAggregate. The same requirement does
not exist for internal classes: They can implement the internal
get_iterator mechanism, without exposing either the Iterator or
IteratorAggregate APIs. This makes them usable in get_iterator(),
but incompatible with any Iterator based APIs.
A lot of internal classes do this, because exposing the userland
APIs is simply a lot of work. This patch alleviates this issue by
providing a generic InternalIterator class, which acts as an
adapater between get_iterator and Iterator, and can be easily
used by many internal classes. At the same time, we extend the
requirement that Traversable implies Iterator or IteratorAggregate
to internal classes as well.
Closes GH-5216.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Formerly, this had to be enabled by passing the configuration flag
`--enable-crt-debug`; now it can be enabled by setting the environment
variable `PHP_WIN32_DEBUG_HEAP`. The advantage is that it is no longer
necessary to do separate builds, at the cost of a very minor
performance penalty during process startup.
|
|
|
|
|
|
| |
Use ZEND_NUM_ARGS() instead.
Clsoes GH-5551
|
|
|
|
|
|
|
|
| |
Avoid subtle differences in behavior depending on whether the
handler is absent or returns FAILURE.
If you previously set cast_object to NULL, create a handler that
always returns FAILURE instead.
|
|
|
|
|
| |
Avoid performing the same casting dance inside each sort compare
function.
|
| |
|
|
|
|
| |
Closes GH-5183
|
|
|
|
|
|
|
|
|
| |
IS_VAR.
This helps to avoid unnecessary IS_REFERENCE checks.
This changes some notices "Only variables should be passed by reference" to exception "Cannot pass parameter %d by reference".
Also, for consistency, compile-time fatal error "Only variables can be passed by reference" was converted to exception "Cannot pass parameter %d by reference"
|
|
|
|
|
|
|
|
| |
This mimicks the changes made to the custom snprintf implementation
by removing the custom 'v' format and custom 'I' length modifier
from the spprintf implementation.
Closes GH-5108
|
|
|
|
|
|
| |
Extensions should instead use the standard 's' format.
Closes GH-5100
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
|
|
|
|
| |
Cf. <http://git.php.net/?p=php-src.git;a=commit;h=0c7124e6beff0a7b0540691db370148be06d242a>.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.
Some test results change due to differences in zpp and arginfo
error messages.
|
| |
|
|
|
|
|
| |
We don't use this internally anymore, and external usages should
be encouraged to move towards 'l'.
|
|
|
|
|
|
|
|
| |
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.
Closes GH-4202.
|
| |
|
|\ |
|
|/ |
|
|
|
|
| |
"maintainer" feature, this commits renames --enable-maintainer-zts to --enable-zts in the autotools build, and related documentation
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
RFC: https://wiki.php.net/rfc/typed_properties_v2
This is a squash of PR #3734, which is a squash of PR #3313.
Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
Co-authored-by: Joe Watkins <krakjoe@php.net>
Co-authored-by: Dmitry Stogov <dmitry@zend.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Albeit CSV is still a widespread data exchange format, it has never been
officially standardized. There exists, however, the “informational” RFC
4180[1] which has no notion of escape characters, but rather defines
`escaped` as strings enclosed in double-quotes where contained
double-quotes have to be doubled. While this concept is supported by
PHP's implementation (`$enclosure`), the `$escape` sometimes interferes,
so that `fgetcsv()` is unable to correctly parse externally generated
CSV, and `fputcsv()` is sometimes generating non-compliant CSV. Since
PHP's `$escape` concept is availble for many years, we cannot drop it
for BC reasons (even though many consider it as bug). Instead we allow
to pass an empty string as `$escape` parameter to the respective
functions, which results in ignoring/omitting any escaping, and as such
is more inline with RFC 4180. It is noteworthy that this is almost no
userland BC break, since formerly most functions did not accept an empty
string, and failed in this case. The only exception was `str_getcsv()`
which did accept an empty string, and used a backslash as escape
character then (which appears to be unintended behavior, anyway).
The changed functions are `fputcsv()`, `fgetcsv()` and `str_getcsv()`,
and also the `::setCsvControl()`, `::getCsvControl()`, `::fputcsv()`,
and `::fgetcsv()` methods of `SplFileObject`.
The implementation also changes the type of the escape parameter of the
PHP_APIs `php_fgetcsv()` and `php_fputcsv()` from `char` to `int`, where
`PHP_CSV_NO_ESCAPE` means to ignore/omit escaping. The parameter
accepts the same values as `isalpha()` and friends, i.e. “the value of
which shall be representable as an `unsigned char` or shall equal the
value of the macro `EOF`. If the argument has any other value, the
behavior is undefined.” This is a subtle BC break, since the character
`chr(128)` has the value `-1` if `char` is signed, and so likely would
be confused with `EOF` when converted to `int`. We consider this BC
break to be acceptable, since it's rather unlikely that anybody uses
`chr(128)` as escape character, and it easily can be fixed by casting
all `escape` arguments to `unsigned char`.
This patch implements the feature requests 38301[2] and 51496[3].
[1] <https://tools.ietf.org/html/rfc4180>
[2] <https://bugs.php.net/bug.php?id=38301>
[3] <https://bugs.php.net/bug.php?id=51496>
|