xref: /PHP-8.2/ext/pcre/tests/bug72688.phpt (revision 315c0536)
1--TEST--
2Bug #72688 (preg_match missing group names in matches)
3--FILE--
4<?php
5
6$pattern = [];
7for ($i = 0; $i < 300; $i++) {
8    $pattern[] = "(?'group{$i}'{$i}$)";
9}
10$fullPattern = '/' . implode('|', $pattern) . '/uix';
11
12preg_match($fullPattern, '290', $matches);
13
14var_dump($matches['group290']);
15?>
16--EXPECT--
17string(3) "290"
18