summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/bug40195.phpt
blob: 87ebf42a66119c5d32b3c054676f753192070d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
--TEST--
Bug #40195 (pcre 6.7 regression)
--FILE--
<?php

var_dump(preg_match('@^(/([a-z]*))*$@', '//abcde', $m)); var_dump($m);
var_dump(preg_match('@^(/(?:[a-z]*))*$@', '//abcde', $m)); var_dump($m);

var_dump(preg_match('@^(/([a-z]+))+$@', '/a/abcde', $m)); var_dump($m);
var_dump(preg_match('@^(/(?:[a-z]+))+$@', '/a/abcde', $m)); var_dump($m);

?>
--EXPECT--
int(1)
array(3) {
  [0]=>
  string(7) "//abcde"
  [1]=>
  string(6) "/abcde"
  [2]=>
  string(5) "abcde"
}
int(1)
array(2) {
  [0]=>
  string(7) "//abcde"
  [1]=>
  string(6) "/abcde"
}
int(1)
array(3) {
  [0]=>
  string(8) "/a/abcde"
  [1]=>
  string(6) "/abcde"
  [2]=>
  string(5) "abcde"
}
int(1)
array(2) {
  [0]=>
  string(8) "/a/abcde"
  [1]=>
  string(6) "/abcde"
}