It appears that the POSIX "extended regex" module/extension can either take advantage of native system support or use an implementation bundled with the PHP source. I haven't found any clear reference to this, but there are clues:
- In the extension's "Installation" instructions, an option is described for which of 3 implementations to compile in. I note that one of the options is "apache", implying that even under Windows, a "third-party" implementation might be available.
- You can browse the source code for where the implementations are actually loaded, e.g. the series of if statements in
ext/ereg/php_regex.h
- The
phpinfo()
output you posted includes the line "Bundled library enabled". (Incidentally, I came upon the source which outputs that:ext/ereg/ereg.c
line 238.
This is actually quite common for many of the older parts of PHP, which were originally built on system libraries and APIs which can reliably be found on "POSIX-compliant" systems, and were later "ported" to other systems by reimplementing the required functionality. This causes some discrepancies between platforms, particularly on Windows, where most of the expected libraries will be missing.
Recent versions of PHP have tried to identify and rectify such inconsistencies - for instance, many of the filesystem-related functions used to have warnings of limited or incorrect behaviour under Windows, but now show these as fixed in a particular version. However, since this particular extension has been deprecated in favour of the cross-platform PCRE library, there has probably not been a great deal of testing of its different implementations, even before the official deprecation notice was added in PHP 5.3.