Annotation of embedaddon/php/ext/pcre/tests/preg_match_basic_002.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: preg_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";
                     11: preg_match("/M(.*)/", $string, $matches);
                     12: 
                     13: var_dump($matches);
                     14: ?>
                     15: ===Done===
                     16: --EXPECTF--
                     17: array(2) {
                     18:   [0]=>
                     19:   string(2) "My"
                     20:   [1]=>
                     21:   string(1) "y"
                     22: }
                     23: ===Done===

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>