summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug61780_2.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/tests/bug61780_2.phpt')
-rw-r--r--ext/pcre/tests/bug61780_2.phpt12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/pcre/tests/bug61780_2.phpt b/ext/pcre/tests/bug61780_2.phpt
index 375c02f5d2..faf44d368b 100644
--- a/ext/pcre/tests/bug61780_2.phpt
+++ b/ext/pcre/tests/bug61780_2.phpt
@@ -2,22 +2,22 @@
Bug #61780 (Inconsistent PCRE captures in match results): named subpatterns
--FILE--
<?php
-preg_match('/(?<a>4)?(?<b>2)?\d/', '23456', $matches);
+preg_match('/(?<a>4)?(?<b>2)?\d/', '23456', $matches, PREG_UNMATCHED_AS_NULL);
var_export($matches);
echo "\n\n";
-preg_match('/(?<a>4)?(?<b>2)?\d/', '23456', $matches, PREG_OFFSET_CAPTURE);
+preg_match('/(?<a>4)?(?<b>2)?\d/', '23456', $matches, PREG_OFFSET_CAPTURE | PREG_UNMATCHED_AS_NULL);
var_export($matches);
echo "\n\n";
-preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches);
+preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_UNMATCHED_AS_NULL);
var_export($matches);
echo "\n\n";
-preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_OFFSET_CAPTURE);
+preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_OFFSET_CAPTURE | PREG_UNMATCHED_AS_NULL);
var_export($matches);
echo "\n\n";
-preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_SET_ORDER);
+preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_SET_ORDER | PREG_UNMATCHED_AS_NULL);
var_export($matches);
echo "\n\n";
-preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE);
+preg_match_all('/(?<a>4)?(?<b>2)?\d/', '123456', $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE | PREG_UNMATCHED_AS_NULL);
var_export($matches);
?>
--EXPECT--