summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug61780.phpt
blob: fdf58f569287e2ba03c629c5b5277c585a67b235 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
--TEST--
Bug #61780 (Inconsistent PCRE captures in match results): basics
--FILE--
<?php
preg_match('/(a)?([a-z]*)(\d*)/', '123', $matches, PREG_UNMATCHED_AS_NULL);
var_dump($matches);
?>
--EXPECT--
array(4) {
  [0]=>
  string(3) "123"
  [1]=>
  NULL
  [2]=>
  string(0) ""
  [3]=>
  string(3) "123"
}