Why does the traversal of swoole_table need PCRE as a regular expression library?

php implements iterator only needs functions such as spl_iterators and next key current. In terms of source code,

-sharpifdef HAVE_PCRE
-sharpinclude <ext/spl/spl_iterators.h>
-sharpendif

-sharpifdef HAVE_PCRE
static PHP_METHOD(swoole_table, rewind);
static PHP_METHOD(swoole_table, next);
static PHP_METHOD(swoole_table, current);
static PHP_METHOD(swoole_table, key);
static PHP_METHOD(swoole_table, valid);
-sharpendif

these functions have never used the regular function of PCRE in the source code of c, so why does swoole force the installation of PCRE? Ask for the boss"s answer, thank you

Apr.16,2021

BUG, SPL, which may originate from early SPL libraries, has methods involving REGEX, but less macro judgment without PCRE leads to errors.

Menu