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