summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/locales.phpt
blob: 647c0d8f7e8b39fd30823c1d2b15e0d63c4b0205 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--TEST--
Localized match
--FILE--
<?php

// this tests if the cache is working correctly, as the char tables
// must be rebuilt after the locale change

setlocale(LC_ALL, 'C', 'POSIX');
var_dump(preg_match('/^\w{6}$/', 'aאבחיט'));

setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese');
var_dump(preg_match('/^\w{6}$/', 'aאבחיט'));

setlocale(LC_ALL, 'C', 'POSIX');
var_dump(preg_match('/^\w{6}$/', 'aאבחיט'));

?>
--EXPECT--
int(0)
int(1)
int(0)