This is a follow-up of previous backticks replacement commits. This
replaces backticks command substitutions in remaining ext config M4
files, phpize, and configure.ac with the recommended $(...).
Note that $(...) still does not work on some obsolete shells that ship
with Solaris 10, for example. Elsewhere they should work. However, for
these obsolete shells Autoconf also re-executes the shell script under
the supported shell so it can make them work regardless.
Additionally, few comments CS are also adjusted to not cause confusion
when searching for backticks usages and one indentation sync done.
As of Autoconf 2.72 the backticks in macro help texts are also replaced
with single quotes.
For the read and write implementation, store the handler pointer in the
first cache slot.
For the write implementation, use the second cache slot to store the
property info.
For a micro-benchmark that performs a write:
```php
$dom = new DOMDocument;
for ($i=0;$i<9999999;$i++)
$dom->strictErrorChecking = false;
```
I obtain the following results on an i7-4790:
```
./sapi/cli/php ./write.php ran
1.42 ± 0.08 times faster than ./sapi/cli/php_old ./write.php
```
For a micro-benchmark that performs a read:
```php
$dom = new DOMDocument;
for ($i=0;$i<9999999;$i++)
$dom->strictErrorChecking;
```
I obtain the following results on the same machine:
```
./sapi/cli/php ./read.php ran
1.29 ± 0.13 times faster than ./sapi/cli/php_old ./read.php
```
- Obsolete backticks replaced with $(...); also backticks used inside
AC_MSG_RESULT result in literal output. The $(...) works as intended
and is executed in the shell with proper result message given
- A couple of AS_VAR_IF used
- Macro arguments quoted
- Added simplistic macro definitions headers as done with other php-src
M4 headers for consistency of reading the code
The m4_normalize(m4_expand([$1])) expands the given argument if it
contains M4 macros, and then trims the items together into a space
separated string in an intuitive way.
- Macro headers synced with current PHP style (a minor description added
and parameters)
- macro arguments quoted
- redundant double quotes reduces
- AS_VAR_IF macros used
- Redundant check message removed because there is already error thrown
right after it
Transliteration works differently across the iconv implementations and
the system. When using GNU libiconv the output in this test is:
string(16) "Zlutouck'y kun\n"
(like on Windows). On glibc's built-in iconv output is:
string(15) "Zlutoucky kun\n"
Since we're requiring fbclient >= 3.0 anyway, we:
* Remove unneeded `#if FB_API_VER >= 25`, `#if FB_API_VER >= 30`,
`#ifdef SQL_BOOLEAN`
* Simplify support for new types for query input parameters.
Support force_null for them.
* fbclient 3.0+ does not have a limit on the length of a SQL query of 64 KB.
The new limit is 10 MB, no one in their right mind would transmit a query of such length.
confusion might come from the previous argument type.
PHP expects ms so we check it fits integer boundaries before the cast.
raising a warning at least for stable branches.
close GH-15548
When configuring with tidy library installed in non-standard paths, the
library adding macro must be done before the PHP_CHECK_LIBRARY to be
able to detect it. This fixes these edge cases. For example:
./configure --with-tidy=/path/to/custom-tidy-installation
This is useful to reduce the memory usage of objects that don't actually
use the backing storage. Examples are XMLReader and DOM. When the
properties were added to the stubs, these objects became much much
bigger, which is a waste of memory.
Closes GH-11644.
Work towards GH-13988.
This issue was introduced in GH-15021. When building the call graph, we can now
see preloaded functions. However, building the call graph involves adding the
function to the caller list of the callee, which we don't want to do for
functions not coming from the script.
Fixes GH-15490
Curl >= 7.80.0 supports declaring a function for `CURLOPT_PREREQFUNCTION` option
that gets called after Curl establishes a connection (including the TLS handshake
for HTTPS connections), but before the actual request is made.
The callable must return either `CURL_PREREQFUNC_OK` or `CURL_PREREQFUNC_ABORT` to
allow or abort the request.
This adds support for it to PHP with required ifdef.
- libc: https://curl.se/libcurl/c/CURLOPT_PREREQFUNCTION.html
Co-authored-by: Gina Peter Bnayard <girgias@php.net>