php-src/ext/pcre/tests/bug72688.phpt
Christoph M. Becker 315c0536c2 Fix #72688: preg_match missing group names in matches
We have to multiply with 0x100 to properly scale the high byte.
2016-07-27 18:50:52 +02:00

18 lines
329 B
PHP

--TEST--
Bug #72688 (preg_match missing group names in matches)
--FILE--
<?php
$pattern = [];
for ($i = 0; $i < 300; $i++) {
$pattern[] = "(?'group{$i}'{$i}$)";
}
$fullPattern = '/' . implode('|', $pattern) . '/uix';
preg_match($fullPattern, '290', $matches);
var_dump($matches['group290']);
?>
--EXPECT--
string(3) "290"