xref: /PHP-5.4/ext/pcre/tests/dollar_endonly.phpt (revision a7bc2866)
1--TEST--
2D (PCRE_DOLLAR_ENDONLY) modififer
3--FILE--
4<?php
5
6var_dump(preg_match_all('/^\S+.+$/', "aeiou\n", $m));
7var_dump($m);
8
9var_dump(preg_match_all('/^\S+.+$/D', "aeiou\n", $m));
10var_dump($m);
11
12var_dump(preg_match_all('/^\S+\s$/D', "aeiou\n", $m));
13var_dump($m);
14
15?>
16--EXPECT--
17int(1)
18array(1) {
19  [0]=>
20  array(1) {
21    [0]=>
22    string(5) "aeiou"
23  }
24}
25int(0)
26array(1) {
27  [0]=>
28  array(0) {
29  }
30}
31int(1)
32array(1) {
33  [0]=>
34  array(1) {
35    [0]=>
36    string(6) "aeiou
37"
38  }
39}
40