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
```
By using `m4_normalize(m4_expand([...]))`, the arguments can be split
into newlines without using backslashes and it makes working with lists
of files a bit easier.
Tested:
- variables inside the argument
- M4 macro expansions
- dnl comments
- any sequence of newlines, backslash-then-newline, multiple spaces,
tabs...
- quoted/unquoted arguments
This now works for PHP_NEW_EXTENSION, PHP_ADD_SOURCES, PHP_ADD_SOURCES_X,
and PHP_SELECT_SAPI. The m4_normalize() usage is left in the php-src
config.m4 files following the 0a0d2d0631
for PECL extensions until phpize will be available on all supported
versions (minimum PHP 8.4).
- 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.
The m4_normalize(m4_expand([...])) simplifies working with a list of
header files. The m4_normalize() is at this point still used in the
php-src config.m4 files because of copy/paste probability to community
extensions where the arguments still need to be done in the old style to
support phpize in PHP-8.3 and earlier. For example:
PHP_INSTALL_HEADERS([ext/dom], m4_normalize([
dom_ce.h
namespace_compat.h
xml_common.h
xpath_callbacks.h
]))
When PHP 8.4 will be the minimum supported PHP version, the headers can
be installed without using m4_normalize() in PECL extensions. For
example:
PHP_INSTALL_HEADERS([ext/dom], [
dom_ce.h
namespace_compat.h
xml_common.h
xpath_callbacks.h
])
- 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