Annotation of embedaddon/php/ext/pcre/tests/bug40195.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #40195 (pcre 6.7 regression)
! 3: --FILE--
! 4: <?php
! 5:
! 6: var_dump(preg_match('@^(/([a-z]*))*$@', '//abcde', $m)); var_dump($m);
! 7: var_dump(preg_match('@^(/(?:[a-z]*))*$@', '//abcde', $m)); var_dump($m);
! 8:
! 9: var_dump(preg_match('@^(/([a-z]+))+$@', '/a/abcde', $m)); var_dump($m);
! 10: var_dump(preg_match('@^(/(?:[a-z]+))+$@', '/a/abcde', $m)); var_dump($m);
! 11:
! 12: ?>
! 13: --EXPECT--
! 14: int(1)
! 15: array(3) {
! 16: [0]=>
! 17: string(7) "//abcde"
! 18: [1]=>
! 19: string(6) "/abcde"
! 20: [2]=>
! 21: string(5) "abcde"
! 22: }
! 23: int(1)
! 24: array(2) {
! 25: [0]=>
! 26: string(7) "//abcde"
! 27: [1]=>
! 28: string(6) "/abcde"
! 29: }
! 30: int(1)
! 31: array(3) {
! 32: [0]=>
! 33: string(8) "/a/abcde"
! 34: [1]=>
! 35: string(6) "/abcde"
! 36: [2]=>
! 37: string(5) "abcde"
! 38: }
! 39: int(1)
! 40: array(2) {
! 41: [0]=>
! 42: string(8) "/a/abcde"
! 43: [1]=>
! 44: string(6) "/abcde"
! 45: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>