xref: /PHP-5.3/ext/mbstring/tests/mb_ereg2.phpt (revision 1c77f594)
1--TEST--
2mb_ereg() returning matches
3--SKIPIF--
4<?php if (!function_exists("mb_ereg")) print "skip"; ?>
5--FILE--
6<?php
7
8$a = -1; $b = -1; $c = -1;
9mbereg($a, $b, $c);
10var_dump($a, $b, $c);
11
12mberegi($a, $b, $c);
13var_dump($a, $b, $c);
14
15mbereg_search_init($a, $b, $c);
16var_dump($a, $b, $c);
17
18echo "Done\n";
19?>
20--EXPECTF--
21int(-1)
22int(-1)
23array(1) {
24  [0]=>
25  string(2) "-1"
26}
27int(-1)
28int(-1)
29array(1) {
30  [0]=>
31  string(2) "-1"
32}
33
34Warning: mbereg_search_init() expects parameter 3 to be string, array given in %s on line %d
35int(-1)
36int(-1)
37array(1) {
38  [0]=>
39  string(2) "-1"
40}
41Done
42