Use our own string builder instead of using libxml's and then having to
copy over.
For the following test:
```
$dom = Dom\HTMLDocument::createEmpty();
$root = $dom->appendChild($dom->createElement('root'));
$root->append('abc', 'def', 'ghi');
$f = $root->firstChild;
for ($i = 0; $i < 1000000; $i++)
$f->wholeText;
```
The following results were obtained on an i7-4790:
```
Benchmark 1: ./sapi/cli/php x.php
Time (mean ± σ): 57.2 ms ± 2.3 ms [User: 53.2 ms, System: 3.4 ms]
Range (min … max): 54.7 ms … 69.3 ms 52 runs
Benchmark 2: ./sapi/cli/php_old x.php
Time (mean ± σ): 89.4 ms ± 3.4 ms [User: 85.6 ms, System: 3.0 ms]
Range (min … max): 86.1 ms … 105.8 ms 32 runs
Summary
./sapi/cli/php x.php ran
1.56 ± 0.09 times faster than ./sapi/cli/php_old x.php
```
This reverts commit 4b22c3e3ad.
As quick measure for GH-10753, that test was skipped on Windows.
However, it seems that there are no longer performance issues with
newer cURL versions, so we run that test again on Windows.
Fixes GH-10753.
Closes GH-14998.
This is mostly about mentioning that VLAs which are a required part of
C99 conforming implementations (although made optional in the C11
standard) *must* *not* be used in php-src.
It's indeed possible this is NULL. When you create a new text-like node
in libxml and pass NULL as content, you do get NULL in the content field
instead of the empty string. You can hit this by creating DOMText or
DOMComment directly and not passing any argument. This could also be
created internally.
We refactor the code such that this detail is hidden and we add a test
to check that it correctly throws an exception.
* zend build making sigjmp_buf and api check as mandatory.
all unixes support it since long time, the few which don't do not meet
the requirements to build php anyway (minix, dietlibc, ...).
RFC 2617 and 7616 describe that for the "Authorization" header we should
not put the qop nor nc value inside quotes. This differs from the
WWW-Authenticate header, which may have been the source of the confusion
in the implementation. While the version with quotes seems to work fine
in some cases, clearly not all servers accept the non-standard form.
To fix the issue, simply removing the quotes of those two header fields
of the client request to be in line with the RFC suffices.
I refer further to example 3.5 in RFC 2617 and example 3.9.1 in
RFC 7616.
RFC 2617: https://datatracker.ietf.org/doc/html/rfc2617
RFC 7616: https://datatracker.ietf.org/doc/html/rfc7616
Closes GH-14328.
This test fails over and over again every time we update the library or
because of small changes elsewhere. This leads to a cycle of test
failures and us bumping the values again. This test has little value so
I propose to just get rid of it.
Fixes GH-13795.
PR #13498 bumped the required OpenSSL version to 1.1.1, but apparently
only for non Windows system. We catch up somewhat by dropping support
for OpenSSL < 1.1.0 on Windows; besides completely removing detection
of old OpenSSL versions in `SETUP_OPENSSL`, we also ensure that all
bundled extension using this function do no longer accept OpenSSL <
1.1.0, to avoid to still be able to build these extensions with older
`phpize` scripts.
We do not cater to `--phar-native-ssl` yet; that might better be
addressed by #14578.
Closes GH-14973.
$obj->ro[] = 42;, passByRef($obj->ro); and the likes should emit an indirect
modification error message. This message already existed but was used
inconsistently.
When building ext/xmlreader with phpize, also ext/dom/dom_ce.h needs to
be installed by dom extension as it is used in
the ext/xmlreader/php_xmlreader.c.
cd ext/xmlreader
phpize
./configure
make
Closes GH-14978
This flag is longer set since the merge of property hooks in
780a8280d2. This patch removes it completely,
because the corresponding error messages are unreachable.
This was only partially fixed in PHP-8.3. Backports and fixes the case for both
initialized and uninitialized property writes.
Fixes GH-14969
Closes GH-14971