| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
For the common ZVAL_OBJ + GC_ADDREF pattern.
This mirrors the existing ZVAL_STR_COPY API.
|
|
|
|
| |
Close GH-5675.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, trait methods are aliased will continue to use the
original function name. In a few places in the codebase, we will
try to look up the actual method name instead. However, this does
not work if an aliased method is used indirectly
(https://bugs.php.net/bug.php?id=69180).
I think it would be better to instead actually change the method
name to the alias. This is in principle easy: We have to allow
function_name to be changed even if op array is otherwise shared
(similar to static_variables). This means we need to addref/release
the function_name separately, but I don't think there is a
performance concern here (especially as everything is usually
interned).
There is a bit of complication in opcache, where we need to make
sure that the function name is released the correct number of times
(interning may overwrite the name in the original op_array, but we
need to release it as many times as the op_array is shared).
Fixes bug #69180.
Fixes bug #74939.
Closes GH-5226.
|
|
|
|
|
|
|
|
| |
Instead add RETURN_COPY(_VALUE) macros will the expected behavior.
RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.
|
| |
|
| |
|
|\
| |
| |
| |
| | |
* PHP-7.4:
Fix use-after-free when trying to write to closure property
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We now store the pointer payload and the type mask separately. This
is in preparation for union types, where we will be using both at
the same time.
To avoid increasing the size of arginfo structures, the
pass_by_reference and is_variadic fields are now stored as part of
the type_mask (8-bit are reserved for custom use).
Different types of pointer payloads are distinguished based on bits
in the type_mask.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Add missing refcount increment
|
| |\
| | |
| | |
| | |
| | | |
* PHP-7.3:
Add missing refcount increment
|
| | |\
| | | |
| | | |
| | | |
| | | | |
* PHP-7.2:
Add missing refcount increment
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Fixed bug #78689
|
| |\ \ \
| | |/ /
| | | |
| | | |
| | | | |
* PHP-7.3:
Fixed bug #78689
|
| | |\ \
| | | |/
| | | |
| | | |
| | | | |
* PHP-7.2:
Fixed bug #78689
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
This was deprecated in PHP 7.4, removing it for PHP 8.0.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We also change `Generator::throw()` to expect a `Throwable` in the
first place, and we now throw a TypeError instead of returning `false`
from `Exception::getTraceAsString()`.
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | |/ / |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
- introduce zend_compare() that returns -1,0,1 dirctly (without intermediate zval)
- remove compare_objects() object handler, and keep only compare() handler
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
`get_closure` handlers are called to check whether an object is
callable, and to actually get the closure, respectively. The behavior
of the handler might differ for these two cases, particularly the
handler may throw in the latter case, but should not in the former.
Therefore we add a `check_only` parameter, to be able to distinguish
the desired purpose.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Free two bits in fn_flags by merging ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions
|
| | | |
| | | |
| | | |
| | | | |
ZEND_ACC_HEAP_RT_CACHE/ZEND_ACC_USER_ARG_INFO and ZEND_ACC_DONE_PASS_TWO/ZEND_ACC_ARENA_ALLOCATED that may be used only for user/internal functions
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Only deprecate unbinding of $this from a closure if $this is
syntactically used within the closure.
This is desired to support Laravel's macro system, see laravel/framework#29482.
This should still allow us to implement the performance improvements
we're interested in for PHP 8, without breaking existing use-cases.
|
|\ \ \ \
| |/ / / |
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Mark "cold" functions
|
| | | | |
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | | |
Instead of a single boolean, so we have space for extension here.
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
Closure::fromCallable() supports only regular methods and magic method invoked through __call()/__callStatic(). It doesn't support method of internal classes invoked through C object or class handlers. This commit prevents crash described at bug #77708, but doesn't implement the desired behavior.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
invoked through __call()/__callStatic().
It doesn't support method of internal classes invoked through C object or class handlers.
This commit prevents crash described at bug #77708, but doesn't implement the desired behavior.
|
| | | |
| | | |
| | | |
| | | | |
insted of zval(s).
|
|\ \ \ \
| |/ / /
| | | |
| | | |
| | | | |
* PHP-7.4:
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.
|
| | | | |
|
| | | | |
|
| | | | |
|
|/ / / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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>
|
| | | |
|
| | | |
|