1--TEST--
2preg_match() single line match with latin input
3--FILE--
4<?php
5/* Prototype  : int preg_match  ( string $pattern  , string $subject  [, array &$matches  [, int $flags  [, int $offset  ]]] )
6 * Description: Perform a regular expression match
7 * Source code: ext/pcre/php_pcre.c
8 */
9
10preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'latin', $test1);
11preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'кириллица', $test2);
12preg_match('/^[\w\s\-\']+$/u', 'latin', $test3);
13
14var_dump([$test1, $test2, $test3]);
15?>
16===Done===
17--EXPECT--
18array(3) {
19  [0]=>
20  array(1) {
21    [0]=>
22    string(5) "latin"
23  }
24  [1]=>
25  array(1) {
26    [0]=>
27    string(18) "кириллица"
28  }
29  [2]=>
30  array(1) {
31    [0]=>
32    string(5) "latin"
33  }
34}
35===Done===
36