summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | Use zend_type.ce_cache__ptr for caching class resulution during ↵Dmitry Stogov2021-02-106-49/+96
| | | | | | | | | | | | | | | | argument/result type checks
* | | | Fixed map_ptr slot sharing for trait/selfDmitry Stogov2021-02-101-1/+1
| | | |
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-103-22/+22
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make mysqli_ssl_set() arguments nullable
| * | | Make mysqli_ssl_set() arguments nullableNikita Popov2021-02-103-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function internally converts zero length arguments to NULL argument -- but we should also accept them in the first place. Null arguments being accepted was actually documented, before bug #78399 adjusted the docs to match current behavior.
* | | | Reuse single map_ptr slot for indentical class namesDmitry Stogov2021-02-104-14/+58
| | | |
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-103-6/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make finfo_open() $magic_database nullable
| * | | Make finfo_open() $magic_database nullableNikita Popov2021-02-103-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-101-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Don't pass null action to __doRequest
| * | | Don't pass null action to __doRequestNikita Popov2021-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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...
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-102-7/+4
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * PHP-8.0: Clarify that location is required in do_request Regenerate arginfo file
| * | | Clarify that location is required in do_requestNikita Popov2021-02-101-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Regenerate arginfo fileNikita Popov2021-02-101-2/+2
| | | | | | | | | | | | | | | | Somehow missed this in the previous commit.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-102-2/+2
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Accept null $location in SoapClient::__setLocation()
| * | | Accept null $location in SoapClient::__setLocation()Nikita Popov2021-02-102-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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).
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-103-7/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make SoapVar arguments nullable
| * | | Make SoapVar arguments nullableNikita Popov2021-02-103-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | $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).
* | | | Merge branch 'PHP-8.0'Máté Kocsis2021-02-090-0/+0
|\ \ \ \ | |/ / /
| * | | Add missing classes to stubsMáté Kocsis2021-02-0918-20/+135
| | | |
* | | | Optimize ZEND_COUNT opcodes on arrays in the jitTyson Andre2021-02-094-1/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Use IS_ALIAS_PTR to make distinct between aliasses and real classesDmitry Stogov2021-02-102-30/+26
| | | |
* | | | Added Inheritance Cache.Dmitry Stogov2021-02-0941-1011/+1595
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-093-19/+25
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | * PHP-8.0: Properly check imagegd() signature Make imagegd $file parameter nullable
| * | | Properly check imagegd() signatureNikita Popov2021-02-091-2/+12
| | | | | | | | | | | | | | | | | | | | Unlike imagegd2(), this function only accepts two parameters, so we should be checking for that.
| * | | Make imagegd $file parameter nullableNikita Popov2021-02-093-18/+14
| | | | | | | | | | | | | | | | | | | | | | | | 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...
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-098-16/+16
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | * PHP-8.0: Use E_ERROR to report arginfo/zpp mismatch Make NumberFormatter ctor $pattern nullable Make IntlDateFormatter ctor $pattern nullable
| * | | Use E_ERROR to report arginfo/zpp mismatchNikita Popov2021-02-091-1/+1
| | | | | | | | | | | | | | | | When E_CORE_ERROR is used, we don't get correct file/line information.
| * | | Make NumberFormatter ctor $pattern nullableNikita Popov2021-02-095-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | | Make IntlDateFormatter ctor $pattern nullableNikita Popov2021-02-094-8/+8
| | | | | | | | | | | | | | | | | | | | The implementation already made this argument nullable, but it was not reflected in the stub.
* | | | Remove a few more unnecessary @generate-function-entries annotationsMáté Kocsis2021-02-094-10/+4
| | | |
* | | | Generate ext/intl class entries from stubsMáté Kocsis2021-02-0944-157/+276
| | | | | | | | | | | | | | | | Closes GH-6670
* | | | Implicitly enable function entry generation when class entry generation is ↵Máté Kocsis2021-02-0963-158/+65
| | | | | | | | | | | | | | | | | | | | | | | | enabled Closes GH-6675
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-0913-15/+15
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make Phar $fileNotFoundScript nullable
| * | | Make Phar $fileNotFoundScript nullableNikita Popov2021-02-0913-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-094-4/+5
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make createDocument() $namespace nullable
| * | | Make createDocument() $namespace nullableNikita Popov2021-02-094-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'PHP-8.0'Nikita Popov2021-02-095-12/+20
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Make getElementsByTagNameNS $namespace nullable
| * | | Make getElementsByTagNameNS $namespace nullableNikita Popov2021-02-095-12/+20
| | | | | | | | | | | | | | | | | | | | According to the DOM specification, this argument is supposed to be nullable.
* | | | Add support for string keys in array unpackingNikita Popov2021-02-0910-65/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for: $array1 = ['a' => 1, 'b' => 2]; $array2 = ['b' => 3, 'c' => 4]; $array = [...$array1, ...$array2]; // => ['a' => 1, 'b' => 3, 'c' => 4] RFC: https://wiki.php.net/rfc/array_unpacking_string_keys Closes GH-6584.
* | | | Remove usage of float keys in arraysGeorge Peter Banyard2021-02-0981-2483/+1845
| | | | | | | | | | | | | | | | | | | | | | | | Also make test output not produce trailling whitespaces Closes GH-6662
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-081-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Avoid C4090 level 1 warning
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-081-1/+1
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Avoid C4090 level 1 warning
| | * | Avoid C4090 level 1 warningChristoph M. Becker2021-02-081-1/+1
| | | | | | | | | | | | | | | | This breaks the build for PHP 8 by default.
* | | | Generate class entries from stubs for another batch of extensionsMáté Kocsis2021-02-0835-86/+314
| | | | | | | | | | | | | | | | Closes GH-6669
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-081-3/+6
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix locale dependent parsing of PostgreSQL version number
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-081-3/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix locale dependent parsing of PostgreSQL version number
| | * | Fix locale dependent parsing of PostgreSQL version numberChristoph M. Becker2021-02-081-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge branch 'PHP-8.0'Christoph M. Becker2021-02-082-1/+77
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-8.0: Fix #80706: mail(): Headers after Bcc headers may be ignored
| * | | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2021-02-083-1/+80
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.4: Fix #80706: mail(): Headers after Bcc headers may be ignored
| | * | Fix #80706: mail(): Headers after Bcc headers may be ignoredChristoph M. Becker2021-02-083-1/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | run-tests.php: move JUnit stuff into a classMax Semenik2021-02-081-263/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is part one of my work that was announced at https://externals.io/message/110391 Closes GH-6671.