xref: /PHP-8.2/ext/pcre/tests/pcre_anchored.phpt (revision c5401854)
1--TEST--
2A (PCRE_ANCHORED) modifier
3--SKIPIF--
4<?php
5if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
6    die("skip no support for \p support PCRE library");
7}
8?>
9--FILE--
10<?php
11
12var_dump(preg_match('/\PN+/', '123abc', $m));
13var_dump($m);
14
15var_dump(preg_match('/\P{N}+/A', '123abc'));
16var_dump(preg_match('/^\P{N}+/', '123abc'));
17var_dump(preg_match('/^\P{N}+/A', '123abc'));
18
19?>
20--EXPECT--
21int(1)
22array(1) {
23  [0]=>
24  string(3) "abc"
25}
26int(0)
27int(0)
28int(0)
29