php-8.0.30-src/ext/pcre/tests/bug80866.phpt

13 lines
241 B
PHP

--TEST--
Bug #80866 preg_split ignores limit flag when pattern with \K has 0-width fullstring match
--FILE--
<?php
var_export(preg_split('~.{3}\K~', 'abcdefghijklm', 3));
?>
--EXPECT--
array (
0 => 'abc',
1 => 'def',
2 => 'ghijklm',
)