xref: /PHP-8.1/ext/pcre/tests/bug80866.phpt (revision 282355ef)
1--TEST--
2Bug #80866 preg_split ignores limit flag when pattern with \K has 0-width fullstring match
3--FILE--
4<?php
5var_export(preg_split('~.{3}\K~', 'abcdefghijklm', 3));
6?>
7--EXPECT--
8array (
9  0 => 'abc',
10  1 => 'def',
11  2 => 'ghijklm',
12)
13