Annotation of embedaddon/php/ext/pcre/tests/bug52971.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #52971 (PCRE-Meta-Characters not working with utf-8)
! 3: --SKIPIF--
! 4: <?php if ((double)PCRE_VERSION < 8.1) die('skip PCRE_VERSION >= 8.1 is required!'); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $message = 'Der ist ein Süßwasserpool Süsswasserpool ... verschiedene Wassersportmöglichkeiten bei ...';
! 9:
! 10: $pattern = '/\bwasser/iu';
! 11: preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
! 12: var_dump($match);
! 13:
! 14: $pattern = '/[^\w]wasser/iu';
! 15: preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
! 16: var_dump($match);
! 17:
! 18: ?>
! 19: --EXPECTF--
! 20: array(1) {
! 21: [0]=>
! 22: array(1) {
! 23: [0]=>
! 24: array(2) {
! 25: [0]=>
! 26: string(6) "Wasser"
! 27: [1]=>
! 28: int(61)
! 29: }
! 30: }
! 31: }
! 32: array(1) {
! 33: [0]=>
! 34: array(1) {
! 35: [0]=>
! 36: array(2) {
! 37: [0]=>
! 38: string(7) " Wasser"
! 39: [1]=>
! 40: int(60)
! 41: }
! 42: }
! 43: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>