| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
RFC: https://wiki.php.net/rfc/mixed_type_v2
Closes GH-5313
Co-authored-by: Dan Ackroyd <danack@basereality.com>
|
| | |
| | |
| | |
| | |
| | | |
Closes GH-5446
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
We have a bunch of APIs for getting type names and it's sometimes
hard to keep them apart ... make it clear that this is the one
you definitely do not want to use.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, disabling a function only replaces the internal
function handler with one that throws a warning, and a few
places in the engine special-case such functions, such as
function_exists. This leaves us with a Schrödinger's function,
which both does not exist (function_exists returns false) and
does exist (you cannot define a function with the same name).
In particular, this prevents the implementation of robust
polyfills, as reported in https://bugs.php.net/bug.php?id=79382:
if (!function_exists('getallheaders')) {
function getallheaders(...) { ... }
}
If getallheaders() is a disabled function, this code will break.
This patch changes disable_functions to remove the functions from
the function table completely. For all intents and purposes, it
will look like the function does not exist.
This also renders two bits of PHP functionality obsolete and thus
deprecated:
* ReflectionFunction::isDisabled(), as it will no longer be
possible to construct the ReflectionFunction of a disabled
function in the first place.
* get_defined_functions() with $exclude_disabled=false, as
get_defined_functions() now never returns disabled functions.
Fixed bug #79382.
Closes GH-5473.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5441
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is only used in reflection, where doing a simple string check
is acceptable.
I'm also dropping the "dtor" printing in the reflection dump.
Dtors are just one of many magic methods, I don't think there's
a point in explicitly highlighting them, when the name is already
unambiguous.
|
| | |
| | |
| | |
| | | |
Closes GH-5398
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The callable name is provided also if it's not callable, in which
case it's basically "what it would be if it were callable", which
is ClassName::__invoke. The current behavior of casting the object
to string makes very little sense as this will just throw an
exception for most objects.
|
| | |
| | |
| | |
| | | |
This is a recurring pattern.
|
| | | |
|
| | |
| | |
| | |
| | | |
Make this functionality available outside reflection.
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5327
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Closes GH-5198
|
| | |
| | |
| | |
| | | |
We may add support for fake_scope if necessary.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | | |
Closes GH-5211
|
| | | |
|
| | |
| | |
| | |
| | | |
Closes GH-5092
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is inline with similar changes to the math functions. Especially,
array to number conversion makes no sense here, and is likely to hide
a programming error.
To make that feasible, we introduce the `n` specifier for classic ZPP
so we can stick with `zend_parse_method_parameters()`.
We also remove a test case, which has been degenerated to a ZPP test.
|
| | |
| | |
| | |
| | | |
Otherwise we may get arginfo/zpp mismatch errors.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-7.4:
Reset trampoline on executor startup
Fix UAF in is_callable() and allocated trampoline
|
| | |
| | |
| | |
| | |
| | | |
By nulling out the function_handler, so it will not get used
below. Reuse the existing helper for this purpose.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of walking up the parent chain, use the scope stored in
the property info. This way we only need to walk one list of
property infos.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed memory leak
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed memory leaks
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Addirional fix for bug #78918
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fix build
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Call zend_unregister_ini_entries() when unload extension loaded through dl() without MSHUTDOWN callback. Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
|
| | |
| | |
| | |
| | |
| | |
| | | |
without MSHUTDOWN callback.
Extensions with MSHUTDOWN should use UNREGISTER_INI_ENTRIES().
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #78898
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-7.4:
Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
Consolidate NEWS for 7.4.0 release
WIP: Merge NEWS
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.3:
Fixed bug #78868 (Calling __autoload() with incorrect EG(fake_scope) value)
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
According to RFC: https://wiki.php.net/rfc/union_types_v2
The type representation now makes use of both the pointer payload
and the type mask at the same time. Additionall, zend_type_list is
introduced as a new kind of pointer payload, which is used to store
multiple class types. Each of the class types is a tagged pointer,
which may be either a class name or class entry. The latter is only
used for typed properties, while arguments/returns will instead use
cache slots. A type list can contain a mix of both names and CEs at
the same time, as not all classes may be resolvable.
One thing this is missing is support for union types in arginfo
and stubs, which I want to handle separately.
I've also dropped the special object code from the JIT implementation
for now -- I plan to add this back in a different form at a later time.
For now I did not want to include non-trivial JIT changes together
with large functional changes.
Another possible piece of follow-up work is to implement "iterable"
as an internal alias for "array|Traversable". I believe this will
eliminate quite a few special-cases that had to be implemented.
Closes GH-4838.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Change a number of "resource used as offset" notices to warnings,
which were previously missed.
* Throw the "resource used as offset" warning for isset() as well.
* Make array_key_exists() behavior with regard to different key
types consistent with isset() and normal array accesses. All key
types now use the usual coercions and array/object keys throw
TypeError.
Closes GH-4887.
|
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|