diff options
Diffstat (limited to 'ext/pcre/tests/dollar_endonly.phpt')
| -rw-r--r-- | ext/pcre/tests/dollar_endonly.phpt | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/ext/pcre/tests/dollar_endonly.phpt b/ext/pcre/tests/dollar_endonly.phpt new file mode 100644 index 0000000..96a5244 --- /dev/null +++ b/ext/pcre/tests/dollar_endonly.phpt @@ -0,0 +1,39 @@ +--TEST-- +D (PCRE_DOLLAR_ENDONLY) modififer +--FILE-- +<?php + +var_dump(preg_match_all('/^\S+.+$/', "aeiou\n", $m)); +var_dump($m); + +var_dump(preg_match_all('/^\S+.+$/D', "aeiou\n", $m)); +var_dump($m); + +var_dump(preg_match_all('/^\S+\s$/D', "aeiou\n", $m)); +var_dump($m); + +?> +--EXPECT-- +int(1) +array(1) { + [0]=> + array(1) { + [0]=> + string(5) "aeiou" + } +} +int(0) +array(1) { + [0]=> + array(0) { + } +} +int(1) +array(1) { + [0]=> + array(1) { + [0]=> + string(6) "aeiou +" + } +} |
