| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Make finfo_open() $magic_database nullable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Empty string was interpreted as a special value here, which indicates
that the default magic database should be used. It makes more sense
to use null for this purpose.
The documentation also explicitly mentions that null can be used.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Don't pass null action to __doRequest
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The parameter is not nullable, so it will be interpreted as
an empty string anyway.
The entire code here is pretty confusing though, and probably
deserves a second loop. The HTTP code only send SOAPAction/action
if soapaction is non-NULL -- but it always is, because it is
accepted through a non-nullable string parameter.
Regarding the SOAPAction header, it appears that always sending
it is actually a requirement of the standard:
> An HTTP client MUST use this header field when issuing a SOAP
> HTTP Request.
Although it does make a distinction between absence of value and
an empty string:
> The header field value of empty string ("") means that the intent
> of the SOAP message is provided by the HTTP Request-URI. No value
> means that there is no indication of the intent of the message.
The empty string interpretation appears to be the desired one.
However, for the action MIME tag the SOAP 1.2 Part 2 specification
says that
> The media type specifies an optional action parameter, which can
> be used to optimize dispatch or routing, among other things.
but also
> The SOAP Action feature defines a single property, which is
> described in Table 14. The value of this property MUST be an
> absolute URI[RFC 3986] and MUST NOT be empty.
which would indicate that we should not be sending an empty
action here.
As I'm not familiar with SOAP and this is long-standing behavior,
I'm just leaving this alone for now...
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-8.0:
Clarify that location is required in do_request
Regenerate arginfo file
|
| | |
| | |
| | |
| | |
| | |
| | | |
As far as I can tell, the location is always non-null here,
and the code wouldn't be able to meaningfully work without a
location.
|
| | |
| | |
| | |
| | | |
Somehow missed this in the previous commit.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Accept null $location in SoapClient::__setLocation()
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently an empty string is used to unset the location. Once
again, it makes more sense to use a null value for this purpose
(though the special behavior of empty strings is retained).
The code comment above the function also explicitly indicates
that null should be accepted, and the function does return null
rather than an empty string for the old location value (if it
is missing).
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Make SoapVar arguments nullable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
$typeName, $typeNamespace, $nodeName and $nodeNamespace all
special-case the empty string and don't set the property entirely
in that case. It makes more sense to use null to indicate absence
here (though of course the empty string behavior is retained).
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Avoid the overhead of a call and checking types
when the argument is definitely an array.
Avoid the overhead of gc when `__destruct` won't get called.
This seemed cheap enough to check for in the jit.
Because of https://wiki.php.net/rfc/restrict_globals_usage
we can be sure in the ZEND_COUNT handler that the array count does not have to
be recomputed in php 8.1.
The below example took 0.854 seconds before the optimization,
and 0.564 seconds after the optimization, giving the same result
```php
<?php
/** @jit */
function bench_count(int $n): int {
$total = 0;
$arr = [];
for ($i = 0; $i < $n; $i++) {
$arr[] = $i;
$total += count($arr);
}
return $total;
}
function main() {
$n = 1000;
$iterations = 50000;
$start = microtime(true);
$result = 0;
for ($i = 0; $i < $iterations; $i++) {
$result += bench_count($n);
}
$elapsed = microtime(true) - $start;
printf("Total for n=%d, iterations=%d = %d, elapsed=%.3f\n", $n, $iterations, $result, $elapsed);
}
main();
```
Before
```asm
mov $0x7feb8cf8a858, %r15
mov $ZEND_COUNT_SPEC_CV_UNUSED_HANDLER, %rax
call *%rax
```
After
```asm
mov 0x70(%r14), %rdi - Copy the count from the `zend_array*` pointer
mov %rdi, (%rax) - Store the count in the destination's value
mov $0x4, 0x8(%rax) - Store IS_LONG(4) in the destination's type
```
And add tracing jit support
Closes GH-5584
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a new transparent technology that eliminates overhead of PHP class inheritance.
PHP classes are compiled and cached (by opcahce) separately, however their "linking" was done at run-time - on each request. The process of "linking" may involve a number of compatibility checks and borrowing methods/properties/constants form parent and traits. This takes significant time, but the result is the same on each request.
Inheritance Cache performs "linking" for unique set of all the depending classes (parent, interfaces, traits, property types, method types involved into compatibility checks) once and stores result in opcache shared memory. As a part of the this patch, I removed limitations for immutable classes (unresolved constants, typed properties and covariant type checks). So now all classes stored in opcache are "immutable". They may be lazily loaded into process memory, if necessary, but this usually occurs just once (on first linking).
The patch shows 8% improvement on Symphony "Hello World" app.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-8.0:
Properly check imagegd() signature
Make imagegd $file parameter nullable
|
| | |
| | |
| | |
| | |
| | | |
Unlike imagegd2(), this function only accepts two parameters,
so we should be checking for that.
|
| | |
| | |
| | |
| | |
| | |
| | | |
It is explicitly documented to be nullable, and this matches other
functions like imagepng. It is also documented to accept a stream,
which it currently does not...
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | | |
* PHP-8.0:
Use E_ERROR to report arginfo/zpp mismatch
Make NumberFormatter ctor $pattern nullable
Make IntlDateFormatter ctor $pattern nullable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Whether the pattern is needed depends on the used style. If no
pattern is needed, null is a more sensible value than an empty
string.
fixup
|
| | |
| | |
| | |
| | |
| | | |
The implementation already made this argument nullable, but it
was not reflected in the stub.
|
| | |
| | |
| | |
| | | |
Closes GH-6670
|
| | |
| | |
| | |
| | |
| | |
| | | |
enabled
Closes GH-6675
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Make Phar $fileNotFoundScript nullable
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
While "" is already treated the same way as absence, null is the
logically correct default here. Making this one argument non-nullable
is particularly pecular when considering that the preceding $alias
and $index arguments are both nullable.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Make createDocument() $namespace nullable
|
| | |
| | |
| | |
| | |
| | |
| | | |
According to the DOM specification, this argument should be
nullable. It's also supposed to be a required argument, but
not changing that at this point.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Make getElementsByTagNameNS $namespace nullable
|
| | |
| | |
| | |
| | |
| | | |
According to the DOM specification, this argument is supposed to
be nullable.
|
| | |
| | |
| | |
| | |
| | |
| | | |
Also make test output not produce trailling whitespaces
Closes GH-6662
|
| | |
| | |
| | |
| | | |
Closes GH-6669
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix locale dependent parsing of PostgreSQL version number
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix locale dependent parsing of PostgreSQL version number
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Version numbers are not supposed to be localized, so we must not apply
locale dependent parsing with `atof()`.
Using `php_version_compare()` might even be better.
Closes GH-6668.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #80706: mail(): Headers after Bcc headers may be ignored
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix #80706: mail(): Headers after Bcc headers may be ignored
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We need to handle the case where a CRLF after a Bcc header is not the
beginning of a folding marker, because in that case the Bcc header was
not the last "thing".
Closes GH-6666.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Affects ZEND_NS_FE
Add test cases of the global function
Backported to php 8.0 from GH-6664
|
| | |
| | |
| | |
| | |
| | | |
gettext leaks global state across requests, so don't repeat these
tests. See also GH-6641.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Affects both INIT_NS_CLASS_ENTRY and ZEND_NS_FE
Add test cases of the global function and namespaced values
Closes GH-6664
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
* PHP-8.0:
Fix test expectation for PHP 8.0
Use ST_Y() instead of the deprecated/removed Y() in test
|
| | |
| | |
| | |
| | |
| | | |
Since float to string conversion is no longer locale dependent, we have
to expect a dot as decimal separator.
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Use ST_Y() instead of the deprecated/removed Y() in test
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #74779: x() and y() truncating floats to integers
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Fix #74779: x() and y() truncating floats to integers
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We must not use the locale dependent `atof()`, but instead use the
(hopefully) locale independent `zend_strtod()`, when converting string
representations of floating point numbers which are sent by the server.
Closes GH-6665.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Try SIGTERM before SIGKILL in opcache restart
|
| |\ \
| | |/
| | |
| | |
| | | |
* PHP-7.4:
Try SIGTERM before SIGKILL in opcache restart
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
SIGTERM is subject to HANDLE_BLOCK_INTERRUPTIONS(), which will
allow code to exit critical sections before it gets terminated.
Closes GH-6493.
|
|\ \ \
| |/ /
| | |
| | |
| | | |
* PHP-8.0:
Fix #53467: Phar cannot compress large archives
|