summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/pcre_anchored.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/tests/pcre_anchored.phpt')
-rw-r--r--ext/pcre/tests/pcre_anchored.phpt28
1 files changed, 28 insertions, 0 deletions
diff --git a/ext/pcre/tests/pcre_anchored.phpt b/ext/pcre/tests/pcre_anchored.phpt
new file mode 100644
index 0000000..a609fdb
--- /dev/null
+++ b/ext/pcre/tests/pcre_anchored.phpt
@@ -0,0 +1,28 @@
+--TEST--
+A (PCRE_ANCHORED) modififer
+--SKIPIF--
+<?php
+if (@preg_match_all('/\p{N}/', '0123456789', $dummy) === false) {
+ die("skip no support for \p support PCRE library");
+}
+?>
+--FILE--
+<?php
+
+var_dump(preg_match('/\PN+/', '123abc', $m));
+var_dump($m);
+
+var_dump(preg_match('/\P{N}+/A', '123abc'));
+var_dump(preg_match('/^\P{N}+/', '123abc'));
+var_dump(preg_match('/^\P{N}+/A', '123abc'));
+
+?>
+--EXPECT--
+int(1)
+array(1) {
+ [0]=>
+ string(3) "abc"
+}
+int(0)
+int(0)
+int(0)