]> granicus.if.org Git - php/commitdiff
Add test for bug #76909
authorAnatol Belski <ab@php.net>
Fri, 21 Sep 2018 13:57:00 +0000 (15:57 +0200)
committerAnatol Belski <ab@php.net>
Fri, 21 Sep 2018 13:57:00 +0000 (15:57 +0200)
ext/pcre/tests/bug76909.phpt [new file with mode: 0644]

diff --git a/ext/pcre/tests/bug76909.phpt b/ext/pcre/tests/bug76909.phpt
new file mode 100644 (file)
index 0000000..e98da40
--- /dev/null
@@ -0,0 +1,21 @@
+--TEST--
+Bug #76909 preg_match difference between 7.3 and < 7.3
+--FILE--
+<?php
+
+$data = " domain.com";
+$reg0 = "/^[\x{0100}-\x{017f}]{1,63}$/iu";
+$reg0 = "/(*NO_JIT)^[\x{0100}-\x{017f}]{1,63}$/iu";
+
+$n0 = preg_match($reg0, $data, $m0);
+$n1 = preg_match($reg0, $data, $m1);
+
+var_dump($n0, $n1, count($m0), count($m1));
+
+?>
+--EXPECT--
+int(0)
+int(0)
+int(0)
+int(0)
+