Home
last modified time | relevance | path

Searched refs:mb_substr_count (Results 1 – 12 of 12) sorted by relevance

/PHP-7.0/ext/mbstring/tests/
H A Dmb_substr_count.phpt2 mb_substr_count()
10 var_dump(@mb_substr_count("", ""));
11 var_dump(@mb_substr_count("��", ""));
12 var_dump(@mb_substr_count("", "��"));
13 var_dump(@mb_substr_count("", "��"));
14 var_dump(@mb_substr_count("", chr(0)));
17 var_dump(@mb_substr_count($a, "bca"));
21 var_dump(@mb_substr_count($a, $b));
24 var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc),
28 var_dump(@mb_substr_count(mb_convert_encoding($a, $to_enc),
[all …]
H A Dmb_substr_count_error1.phpt2 Test mb_substr_count() function : error conditions - pass incorrect number of arguments
6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
16 * Pass an incorrect number of arguments to mb_substr_count() to test behaviour
19 echo "*** Testing mb_substr_count() : error conditions ***\n";
22 //Test mb_substr_count with one more than the expected number of arguments
28 var_dump( mb_substr_count($haystack, $needle, $encoding, $extra_arg) );
30 // Testing mb_substr_count with one less than the expected number of arguments
33 var_dump( mb_substr_count($haystack) );
38 *** Testing mb_substr_count() : error conditions ***
40 -- Testing mb_substr_count() function with more than expected no. of arguments --
[all …]
H A Dbug43993.phpt2 Bug #43993 (mb_substr_count() behaves differently to substr_count() with overlapping needles)
7 var_dump(mb_substr_count("abcabcabca", "abcabc"));
8 var_dump(mb_substr_count("abcabcabca", "abc"));
9 var_dump(mb_substr_count("abcabcabca", "cab"));
10 var_dump(mb_substr_count("abcabcabca", "bca"));
11 var_dump(mb_substr_count("ababababab", "ba"));
12 var_dump(mb_substr_count("ababababab", "ab"));
13 var_dump(mb_substr_count("ababababab", "bc"));
14 var_dump(mb_substr_count("aaaaaaaaaa", "a"));
15 var_dump(mb_substr_count("aaaaaaaaaa", "b"));
H A Dmb_substr_count_variation3.phpt6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
20 echo "*** Testing mb_substr_count() : usage variations ***\n";
98 var_dump( mb_substr_count($haystack, $needle, $input) );
107 *** Testing mb_substr_count() : usage variations ***
111 Warning: mb_substr_count(): Unknown encoding "0" in %s on line %d
116 Warning: mb_substr_count(): Unknown encoding "1" in %s on line %d
156 Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
161 Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
171 Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
181 Warning: mb_substr_count(): Unknown encoding "" in %s on line %d
[all …]
H A Dmb_substr_count_basic.phpt2 Test mb_substr_count() function : basic functionality
6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
10 /* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
16 * Test Basic functionality of mb_substr_count
19 echo "*** Testing mb_substr_count() : basic functionality ***\n";
28 var_dump(mb_substr_count($string_ascii, 'is'));
29 var_dump(mb_substr_count($string_ascii, 'hello, world'));
32 var_dump(mb_substr_count($string_mb, $needle_mb1));
33 var_dump(mb_substr_count($string_mb, $needle_mb2));
38 *** Testing mb_substr_count() : basic functionality ***
H A Dmb_substr_count_error2.phpt2 Test mb_substr_count() function : error conditions - pass unknown encoding
6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
10 /* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
16 * Test behaviour of mb_substr_count() function when passed an unknown encoding
19 echo "*** Testing mb_substr_count() : error conditions ***\n";
25 echo "\n-- Testing mb_substr_count() function with an unknown encoding --\n";
26 var_dump(mb_substr_count($haystack, $needle, $encoding));
31 *** Testing mb_substr_count() : error conditions ***
33 -- Testing mb_substr_count() function with an unknown encoding --
35 Warning: mb_substr_count(): Unknown encoding "unknown-encoding" in %s on line %d
H A Dmb_substr_count_variation2.phpt6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
19 echo "*** Testing mb_substr_count() : usage variations ***\n";
96 var_dump( mb_substr_count($haystack, $input) );
105 *** Testing mb_substr_count() : usage variations ***
136 Warning: mb_substr_count(): Empty substring in %s on line %d
141 Warning: mb_substr_count(): Empty substring in %s on line %d
149 Warning: mb_substr_count(): Empty substring in %s on line %d
157 Warning: mb_substr_count(): Empty substring in %s on line %d
162 Warning: mb_substr_count(): Empty substring in %s on line %d
167 Warning: mb_substr_count(): Empty substring in %s on line %d
[all …]
H A Dmb_substr_count_variation4.phpt2 Test mb_substr_count() function : variation - pass a $needle that overlaps in $haystack
6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
10 /* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding])
16 * Pass mb_substr_count() a $needle that overlaps in $haystack and see whether
21 echo "*** Testing mb_substr_count() : usage variations ***\n";
26 var_dump(mb_substr_count($string_ascii, b'abcabc')); //needle overlaps in haystack
31 var_dump(mb_substr_count($string_mb, $needle_mb, 'utf-8'));
37 *** Testing mb_substr_count() : usage variations ***
H A Dmb_substr_count_variation1.phpt2 Test mb_substr_count() function : usage variations - Pass different data types as $haystack arg
6 function_exists('mb_substr_count') or die("skip mb_substr_count() is not available in this build");
10 /* Prototype :int mb_substr_count(string $haystack, string $needle [, string $encoding])
16 * Pass different data types as $haystack argument to mb_substr_count() to test behaviour
19 echo "*** Testing mb_substr_count() : usage variations ***\n";
93 // loop through each element of $inputs to check the behavior of mb_substr_count()
97 var_dump( mb_substr_count($input, $needle) );
107 *** Testing mb_substr_count() : usage variations ***
180 Warning: mb_substr_count() expects parameter 1 to be string, resource given in %s on line %d
H A Dmb_get_info.phpt63 string(15) "mb_substr_count"
127 string(15) "mb_substr_count"
153 string(15) "mb_substr_count"
/PHP-7.0/ext/mbstring/
H A Dmbstring.h115 PHP_FUNCTION(mb_substr_count);
H A Dmbstring.c541 PHP_FE(mb_substr_count, arginfo_mb_substr_count)
2811 PHP_FUNCTION(mb_substr_count) in PHP_FUNCTION() argument

Completed in 22 milliseconds