bug80866.phpt 241 B

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