1--TEST--
2preg_match() single line match with multi-line input
3--FILE--
4<?php
5/* Prototype  : int preg_match  ( string $pattern  , string $subject  [, array &$matches  [, int $flags  [, int $offset  ]]] )
6 * Description: Perform a regular expression match
7 * Source code: ext/pcre/php_pcre.c
8 */
9
10$string = "My\nName\nIs\nStrange";
11preg_match("/M(.*)/", $string, $matches);
12
13var_dump($matches);
14?>
15===Done===
16--EXPECT--
17array(2) {
18  [0]=>
19  string(2) "My"
20  [1]=>
21  string(1) "y"
22}
23===Done===
24