| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes GH-4732.
|
|
|
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
| |
Instead of a simple if or 0 comparison. This would no longer work
if zend_type is a struct.
|
|
|
|
|
|
|
|
|
|
| |
Use value 0 instead. To compensate we check in ReflectionParameter
allowsNull() whether the type is set at all: If it isn't, it always
allows null.
This removes a discrepancy between internal&userland functions:
For userland functions allowsNull() on untyped parameters returned
true, but for internal functions it returned false.
|
|
|
|
| |
Use ?T instead of "T or NULL".
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This switches zend_type from storing a single IS_* type code to
storing a MAY_BE_* type mask. Right now most code still assumes
that there is only a single type in the mask (or two together
with MAY_BE_NULL). But this will make it a lot simpler to introduce
union types.
An additional advantage (and why I'm doing this separately), is
that a number of special cases no longer need to be handled
separately: We can do a single mask & (1 << type) check to handle
all simple types, booleans (true|false) and null.
|
|
|
|
| |
This is never instantiated directly, only child classes are used.
|
|
|
|
|
|
|
|
| |
This method only makes sense for single types, e.g. it would be
meaningless for union types.
Note that we always return ReflectionNamedType right now, so this does
not break compatibility for code using any currently existing types.
|
|\ |
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
New fix for bug #78263. This is special-cased elsewhere in the engine,
so we need to mirror it here.
|
| |
| |
| |
| | |
This reverts commit 428cfdd1810b17f0064b7691276f0eb92dc963b6.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
And remove the Reflector::export() interface method.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Evaluate constant in class scope
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| | |
export() methods were implemented in a roundabout way, where they
would call Reflection::export(), which would then call __toString().
Cut out the middleman by directly calling __toString().
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
And don't return null for rc=1 references. Leave it to the user
to decide whether or not they want to consider these as references
or not.
Fixes bug #78263.
|
| |
| |
| |
| | |
Closes GH-4247.
|
| |
| |
| |
| | |
Closes GH-4255.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Cheaper checks for exceptions thrown from __toString()
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
We weren't able to do this in 7.1 because the deprecation notice
may be converted to an exception and __toString() can't throw,
which means that it ultimately become a fatal error. This issue
is resolved now, so we can mark the method as deprecated.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
|
|\ \
| |/
| |
| |
| | |
* PHP-7.4:
Replace ZVAL_COPY() and ZVAL_COPY_VALUE() for IS_OBJECT by cheaper macros
|
| | |
|
|\ \
| |/ |
|
| |
| |
| |
| | |
The usual wrappers around ZVAL_EMPTY_ARRAY()...
|
|\ \
| |/ |
|
| |\ |
|
| | |\ |
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Treat singleton references as non-references in ReflectionReference
and return null for them.
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
At this point zpp overhead makes up a significant part of this
function.
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Instead of going through write_property, directly assign to the
respective property slot.
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | |/ / |
|
| | |\ \
| | | |/ |
|
| | | | |
|
|\ \ \ \
| |/ / / |
|
| |\ \ \
| | |/ / |
|
| | |\ \
| | | |/ |
|