summaryrefslogtreecommitdiff
path: root/ext/pcre/tests
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2021-03-15 14:47:50 +0100
committerNikita Popov <nikita.ppv@gmail.com>2021-03-15 14:48:02 +0100
commit50254de0a2cc63570a5caf7666151a77e7bd0b7a (patch)
tree23259a1b2c848b7c4973f567dcb4281c0c237772 /ext/pcre/tests
parent6493b516f9573f8a9368376b900eb9df758b1d40 (diff)
parent282355efd5d53ba180d30794737c33898031104e (diff)
downloadphp-git-50254de0a2cc63570a5caf7666151a77e7bd0b7a.tar.gz
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4: Fix bug #80866
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',
+)