| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove inline.
Remove old folding blocks.
Convert an int usage to bool.
Convert some uses of int and size_t into zend_long. This is
incomplete because get_gc requires `int *n`, which should probably
become zend_long or size_t eventually.
Adds spl_fixedarray_empty to help enforce invariants.
Adds spl_fixedarray_default_ctor.
Documents some functions.
Reworks spl_fixedarray_copy into two functions:
- spl_fixedarray_copy_ctor
- spl_fixedarray_copy_range
I'm hoping to eventually export SplFixedArray for extensions to
use directly, which is the motivation here.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
One strange feature of SplFixedArray was that it could not be used in nested foreach
loops. If one did so, the inner loop would overwrite the iteration state of the outer
loop.
To illustrate:
$spl = SplFixedArray::fromArray([0, 1]);
foreach ($spl as $a) {
foreach ($spl as $b) {
echo "$a $b";
}
}
Would only print two lines:
0 0
0 1
Use the new InternalIterator feature which was introduced in ff19ec2df3 to convert
SplFixedArray to an Aggregate rather than Iterable. As a bonus, we get to trim down
some ugly code! Yay!
|
| |
|
|
|
|
| |
reference'
|
|
|
|
|
|
|
| |
Warning to Error promotion and a Notice to Warning promotion to align
with the behaviour specified in the Reclassify Engine Warnings RFC.
Closes GH-6072
|
|
|
|
| |
Closes GH-5758
|
|
|
|
| |
Optional handler with the same semantics as the object handler.
|
|
|
|
|
| |
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
|
|
|
|
| |
Closes GH-5458
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix #79393: Null coalescing operator failing with SplFixedArray
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Fix #79393: Null coalescing operator failing with SplFixedArray
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We favor the KISS principle over optimization[1] – SPL is already
special enough.
[1] <https://github.com/php/php-src/pull/2489/commits/352f3d4476a79bb86136b431719df7394e5a8d4e#r112498098>ff
|
| | |
| | |
| | |
| | | |
Closes GH-5245
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The SplFixedArray API treats all elements as NULL, even if they
have not been explicitly initialized. Rather than initializing
to UNDEF an treating that specially in various circumstances,
directly initialize elements to NULL.
This also fixes an assertion failure in the attached test case.
|
| | | |
|
| | |
| | |
| | |
| | | |
In reflection, sodium, and SPL
|
| | |
| | |
| | |
| | |
| | |
| | | |
Since `zend_parse_parameters()` throws now, there is no reason to
explicitly call `zend_parse_parameters_throw()` anymore, and since both
have actually the same implementation, we redefine the latter as macro.
|
| | |
| | |
| | |
| | | |
Closes GH-4732.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
|
| | | |
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | | |
The usual wrappers around ZVAL_EMPTY_ARRAY()...
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Use ZEND_ACC_REUSE_GET_ITERATOR flag instead of run-time class modification
|
| | | |
|
|/ /
| |
| |
| | |
insted of zval(s).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.
In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.
This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
|
|
|
|
| |
consumption and avoid race condition during resolving/caching of user iterator functions of internal classes in ZTS build.
|
| |
|
| |
|
| |
|
|
|
|
| |
__construct, __destruct, __wakeup does not have return types defined.
|
|
|
|
| |
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Using ecalloc() to create objects is expensive, because the
dynamic-size memset() is unreasonably slow. Make sure we only
zero the main object structure with known size, as the properties
are intialized separately anyway.
Technically we do not need to zero the embedded zend_object
structure either, but as long as the memset argument is constant,
a couple more bytes don't really matter.
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \
| |/ |
|