diff options
| author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-04-22 15:03:26 +0200 |
|---|---|---|
| committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-04-22 15:03:26 +0200 |
| commit | 6b2c002c41f374e4aefe46310b0bc72ac3378888 (patch) | |
| tree | 25e14a50f948e45155363827a0b473c11e3e976c /ext/pcre/tests | |
| parent | 11c698f1f3da6aa85cedef877a18b19e6b893947 (diff) | |
| parent | a1a044dcc74379fafb2b63db5ab033aa062aada7 (diff) | |
| download | php-git-6b2c002c41f374e4aefe46310b0bc72ac3378888.tar.gz | |
Merge branch 'PHP-7.4'
* PHP-7.4:
Add additional preg_match test case
Diffstat (limited to 'ext/pcre/tests')
| -rw-r--r-- | ext/pcre/tests/preg_match_latin.phpt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/ext/pcre/tests/preg_match_latin.phpt b/ext/pcre/tests/preg_match_latin.phpt new file mode 100644 index 0000000000..8f1d1899cb --- /dev/null +++ b/ext/pcre/tests/preg_match_latin.phpt @@ -0,0 +1,35 @@ +--TEST-- +preg_match() single line match with latin input +--FILE-- +<?php +/* Prototype : int preg_match ( string $pattern , string $subject [, array &$matches [, int $flags [, int $offset ]]] ) + * Description: Perform a regular expression match + * Source code: ext/pcre/php_pcre.c + */ + +preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'latin', $test1); +preg_match('/^[\w\p{Cyrillic}\s\-\']+$/u', 'кириллица', $test2); +preg_match('/^[\w\s\-\']+$/u', 'latin', $test3); + +var_dump([$test1, $test2, $test3]); +?> +===Done=== +--EXPECT-- +array(3) { + [0]=> + array(1) { + [0]=> + string(5) "latin" + } + [1]=> + array(1) { + [0]=> + string(18) "кириллица" + } + [2]=> + array(1) { + [0]=> + string(5) "latin" + } +} +===Done=== |
