Home
last modified time | relevance | path

Searched refs:mb_strpos (Results 1 – 16 of 16) sorted by relevance

/PHP-5.5/ext/mbstring/tests/
H A Dmb_strpos.phpt2 mb_strpos()
79 print mb_strpos($euc_jp, 3, 0) . "\n";
80 print mb_strpos($euc_jp, 0, 0) . "\n";
82 $r = mb_strpos($euc_jp, b'�ڹ��', 0);
84 $r = mb_strpos($euc_jp, b"\n", 0);
92 print mb_strpos($euc_jp, b'0') . "\n";
93 print mb_strpos($euc_jp, 3) . "\n";
94 print mb_strpos($euc_jp, 0) . "\n";
96 $r = mb_strpos($euc_jp, b'�ڹ��');
98 $r = mb_strpos($euc_jp, b"\n");
[all …]
H A Dmb_strpos_error1.phpt2 Test mb_strpos() function : error conditions - Pass incorrect number of args
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
16 * Test how mb_strpos behaves when passed an incorrect number of arguments
19 echo "*** Testing mb_strpos() : error conditions ***\n";
22 //Test mb_strpos with one more than the expected number of arguments
29 var_dump( mb_strpos($haystack, $needle, $offset, $encoding, $extra_arg) );
31 // Testing mb_strpos with one less than the expected number of arguments
34 var_dump( mb_strpos($haystack) );
39 *** Testing mb_strpos() : error conditions ***
41 -- Testing mb_strpos() function with more than expected no. of arguments --
[all …]
H A Dmb_strpos_variation4.phpt6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
20 echo "*** Testing mb_strpos() : usage variations ***\n";
109 *** Testing mb_strpos() : usage variations ***
113 Warning: mb_strpos(): Unknown encoding "0" in %s on line %d
118 Warning: mb_strpos(): Unknown encoding "1" in %s on line %d
158 Warning: mb_strpos(): Unknown encoding "" in %s on line %d
163 Warning: mb_strpos(): Unknown encoding "" in %s on line %d
173 Warning: mb_strpos(): Unknown encoding "" in %s on line %d
183 Warning: mb_strpos(): Unknown encoding "" in %s on line %d
188 Warning: mb_strpos(): Unknown encoding "" in %s on line %d
[all …]
H A Dmb_strpos_basic.phpt2 Test mb_strpos() function : basic functionality
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
10 /* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
16 * Test basic functionality of mb_strpos with ASCII and multibyte characters
19 echo "*** Testing mb_strpos() : basic functionality***\n";
28 var_dump(mb_strpos($string_ascii, b'd', 2, 'ISO-8859-1'));
31 var_dump(mb_strpos($string_ascii, '123'));
35 var_dump(mb_strpos($string_mb, $needle1));
39 var_dump(mb_strpos($string_mb, $needle2));
44 *** Testing mb_strpos() : basic functionality***
H A Dmb_strpos_error2.phpt2 Test mb_strpos() function : error conditions - Pass unknown encoding
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
10 /* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
16 * Pass an unknown encoding to mb_strpos() to test behaviour
19 echo "*** Testing mb_strpos() : error conditions ***\n";
25 var_dump( mb_strpos($haystack, $needle, $offset, $encoding) );
30 *** Testing mb_strpos() : error conditions ***
32 Warning: mb_strpos(): Unknown encoding "unknown-encoding" in %s on line %d
H A Dmb_strpos_variation5.phpt6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
23 echo "*** Testing mb_strpos() : usage variations ***\n";
33 * mb_strpos should not be able to accept negative values as $offset.
39 var_dump(mb_strpos($string_ascii, $needle_ascii, $i));
41 var_dump(mb_strpos($string_mb, $needle_mb, $i, 'UTF-8'));
48 *** Testing mb_strpos() : usage variations ***
53 Warning: mb_strpos(): Offset not contained in string in %s on line %d
57 Warning: mb_strpos(): Offset not contained in string in %s on line %d
81 Warning: mb_strpos(): Offset not contained in string in %s on line %d
85 Warning: mb_strpos(): Offset not contained in string in %s on line %d
[all …]
H A Dmb_strpos_variation2.phpt6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
19 echo "*** Testing mb_strpos() : usage variations ***\n";
107 *** Testing mb_strpos() : usage variations ***
138 Warning: mb_strpos(): Empty delimiter in %s on line %d
143 Warning: mb_strpos(): Empty delimiter in %s on line %d
151 Warning: mb_strpos(): Empty delimiter in %s on line %d
159 Warning: mb_strpos(): Empty delimiter in %s on line %d
164 Warning: mb_strpos(): Empty delimiter in %s on line %d
169 Warning: mb_strpos(): Empty delimiter in %s on line %d
186 Warning: mb_strpos(): Empty delimiter in %s on line %d
[all …]
H A Dmb_strpos_variation3.phpt2 Test mb_strpos() function : usage variations - pass different data types as $offset arg
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
16 * Pass mb_strpos different data types as $offset arg to test behaviour
19 echo "*** Testing mb_strpos() : usage variations ***\n";
94 // loop through each element of $inputs to check the behavior of mb_strpos()
98 var_dump( mb_strpos($haystack, $needle, $input, $encoding));
107 *** Testing mb_strpos() : usage variations ***
117 Warning: mb_strpos(): Offset not contained in string in %s on line %d
122 Warning: mb_strpos(): Offset not contained in string in %s on line %d
130 Warning: mb_strpos(): Offset not contained in string in %s on line %d
[all …]
H A Dbug43840.phpt2 Test mb_strpos() function : mb_strpos bounds check is byte count rather than a character count
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
16 * mb_strpos bounds check is byte count rather than a character count:
29 var_dump( mb_strpos($string_mb, $needle, $i, 'UTF-8') );
31 var_dump(mb_strpos(b'This is na English ta', b'a', $i));
50 Warning: mb_strpos(): Offset not contained in string in %s on line %d
54 Warning: mb_strpos(): Offset not contained in string in %s on line %d
60 Warning: mb_strpos(): Offset not contained in string in %s on line %d
64 Warning: mb_strpos(): Offset not contained in string in %s on line %d
70 Warning: mb_strpos(): Offset not contained in string in %s on line %d
[all …]
H A Dmb_strpos_variation1.phpt2 Test mb_strpos() function : usage variations - pass different data types to $haystack arg
6 function_exists('mb_strpos') or die("skip mb_strpos() is not available in this build");
10 /* Prototype : int mb_strpos(string $haystack, string $needle [, int $offset [, string $encoding]])
16 * Pass mb_strpos different data types as $haystack arg to test behaviour
19 echo "*** Testing mb_strpos() : usage variations ***\n";
94 // loop through each element of $inputs to check the behavior of mb_strpos()
98 var_dump( mb_strpos($input, $needle, $offset, $encoding));
107 *** Testing mb_strpos() : usage variations ***
180 Warning: mb_strpos() expects parameter 1 to be string, resource given in %s on line %d
H A Dbug45923.phpt19 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 0));
20 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 3));
21 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 6));
22 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 9));
23 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 11));
24 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", 12));
25 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", -1));
26 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", -3));
27 var_dump(mb_strpos("●○◆ ●○◆ ●○◆", "●○◆", -6));
114 Warning: mb_strpos(): Offset not contained in string in %s on line %d
[all …]
H A Dmb_get_info.phpt43 string(9) "mb_strpos"
107 string(9) "mb_strpos"
133 string(9) "mb_strpos"
H A Dmb_str_functions_opt-parameter.phpt7 echo mb_strpos('abb', 'b', null, 'UTF-8') . "\n";
/PHP-5.5/ext/mbstring/
H A Dmbstring.h104 PHP_FUNCTION(mb_strpos);
H A Dmbstring.c540 PHP_FE(mb_strpos, arginfo_mb_strpos)
2223 PHP_FUNCTION(mb_strpos) in PHP_FUNCTION() argument
/PHP-5.5/
H A DNEWS6973 - Fixed bug #43840 (mb_strpos bounds check is byte count rather than a character count). (Rui)

Completed in 69 milliseconds