This partially reverts commit
c55d09c2f547634b577aa5aeaa1438d772bc29d1,
because `MB_ONIGURUMA_VERSION` is only available as of PHP 7.4.0, so
that change made no sense for PHP-7.3; we keep it for PHP-7.4, though.
We also stick with the modification to bug78633.phpt.
<?php
if (!extension_loaded('mbstring')) die('skip mbstring not enabled');
function_exists('mb_ereg_search') or die("skip mb_ereg_search() is not available in this build");
-version_compare(MB_ONIGURUMA_VERSION, '6.9.4', '<') or die("skip requires oniguruma < 6.9.4");
?>
--FILE--
<?php
+++ /dev/null
---TEST--
-Testing mb_ereg_search() named capture groups
---SKIPIF--
-<?php
-if (!extension_loaded('mbstring')) die('skip mbstring not enabled');
-function_exists('mb_ereg_search') or die("skip mb_ereg_search() is not available in this build");
-version_compare(MB_ONIGURUMA_VERSION, '6.9.4', '>=') or die("skip requires oniguruma >= 6.9.4");
-?>
---FILE--
-<?php
- mb_regex_encoding("UTF-8");
- mb_ereg_search_init(' 中国?');
- mb_ereg_search('(?<wsp>\s*)(?<word>\w+)(?<punct>[?!])');
- var_dump(mb_ereg_search_getregs());
-?>
---EXPECT--
-array(7) {
- [0]=>
- string(11) " 中国?"
- [1]=>
- string(2) " "
- [2]=>
- string(6) "中国"
- [3]=>
- string(3) "?"
- ["wsp"]=>
- string(2) " "
- ["word"]=>
- string(6) "中国"
- ["punct"]=>
- string(3) "?"
-}