File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
pcre /
tests /
bug52971.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:59 2012 UTC (12 years, 8 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Bug #52971 (PCRE-Meta-Characters not working with utf-8)
--SKIPIF--
<?php if ((double)PCRE_VERSION < 8.1) die('skip PCRE_VERSION >= 8.1 is required!'); ?>
--FILE--
<?php
$message = 'Der ist ein Süßwasserpool Süsswasserpool ... verschiedene Wassersportmöglichkeiten bei ...';
$pattern = '/\bwasser/iu';
preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
var_dump($match);
$pattern = '/[^\w]wasser/iu';
preg_match_all($pattern, $message, $match, PREG_OFFSET_CAPTURE);
var_dump($match);
?>
--EXPECTF--
array(1) {
[0]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(6) "Wasser"
[1]=>
int(61)
}
}
}
array(1) {
[0]=>
array(1) {
[0]=>
array(2) {
[0]=>
string(7) " Wasser"
[1]=>
int(60)
}
}
}
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>