summaryrefslogtreecommitdiff
path: root/ext/pcre/tests/preg_match_basic_002.phpt
blob: d91bdce836a894908de84bd98235d23e4c934208 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
--TEST--
preg_match() single line match with multi-line input
--FILE--
<?php
$string = "My\nName\nIs\nStrange";
preg_match("/M(.*)/", $string, $matches);

var_dump($matches);
?>
--EXPECT--
array(2) {
  [0]=>
  string(2) "My"
  [1]=>
  string(1) "y"
}