summaryrefslogtreecommitdiff
path: root/ext/pcre/tests
diff options
context:
space:
mode:
authorDharman <tekiela246@gmail.com>2021-03-15 12:21:44 +0000
committerNikita Popov <nikita.ppv@gmail.com>2021-03-15 14:47:45 +0100
commit282355efd5d53ba180d30794737c33898031104e (patch)
tree9668eabf25166f36ebda5752a49fc6699155fd3c /ext/pcre/tests
parentc93b461ad70e341f1b01f5910f3cfc3055a3941e (diff)
downloadphp-git-282355efd5d53ba180d30794737c33898031104e.tar.gz
Fix bug #80866
Closes GH-6774.
Diffstat (limited to 'ext/pcre/tests')
-rw-r--r--ext/pcre/tests/bug80866.phpt12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/pcre/tests/bug80866.phpt b/ext/pcre/tests/bug80866.phpt
new file mode 100644
index 0000000000..1de5390cb3
--- /dev/null
+++ b/ext/pcre/tests/bug80866.phpt
@@ -0,0 +1,12 @@
+--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',
+)