2006-06-13 21:55:38 +00:00
|
|
|
|
--TEST--
|
|
|
|
|
Localized match
|
|
|
|
|
--SKIPIF--
|
2006-06-14 17:37:53 +00:00
|
|
|
|
<?php if (!function_exists('setlocale')) die('skip: setlocale() not available'); ?>
|
2006-07-03 13:04:45 +00:00
|
|
|
|
<?php if (!@setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese')) die('skip pt locale not available');
|
2006-06-13 21:55:38 +00:00
|
|
|
|
--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<><61><EFBFBD><EFBFBD><EFBFBD>'));
|
|
|
|
|
|
2006-06-26 23:42:59 +00:00
|
|
|
|
setlocale(LC_ALL, 'pt_PT', 'pt', 'pt_PT.ISO8859-1', 'portuguese');
|
2006-06-13 21:55:38 +00:00
|
|
|
|
var_dump(preg_match('/^\w{6}$/', 'a<><61><EFBFBD><EFBFBD><EFBFBD>'));
|
|
|
|
|
|
|
|
|
|
setlocale(LC_ALL, 'C', 'POSIX');
|
|
|
|
|
var_dump(preg_match('/^\w{6}$/', 'a<><61><EFBFBD><EFBFBD><EFBFBD>'));
|
|
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
--EXPECT--
|
|
|
|
|
int(0)
|
|
|
|
|
int(1)
|
|
|
|
|
int(0)
|