Home
last modified time | relevance | path

Searched refs:mb_substr (Results 1 – 20 of 20) sorted by relevance

/PHP-7.2/ext/mbstring/tests/
H A Dmb_substr_error1.phpt2 Test mb_substr() function : error conditions - Pass incorrect number of args
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
16 * Pass incorrect number of arguments to mb_substr() to test behaviour
19 echo "*** Testing mb_substr() : error conditions ***\n";
21 //Test mb_substr with one more than the expected number of arguments
28 var_dump( mb_substr($str, $start, $length, $encoding, $extra_arg) );
30 // Testing mb_substr with one less than the expected number of arguments
33 var_dump( mb_substr($str) );
38 *** Testing mb_substr() : error conditions ***
40 -- Testing mb_substr() function with more than expected no. of arguments --
[all …]
H A Dmb_substr_variation2.phpt6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
20 echo "*** Testing mb_substr() : usage variations ***\n";
99 $res = mb_substr($str, $start, $length, $input);
113 *** Testing mb_substr() : usage variations ***
117 Warning: mb_substr(): Unknown encoding "0" in %s on line %d
122 Warning: mb_substr(): Unknown encoding "1" in %s on line %d
162 Warning: mb_substr(): Unknown encoding "" in %s on line %d
167 Warning: mb_substr(): Unknown encoding "" in %s on line %d
177 Warning: mb_substr(): Unknown encoding "" in %s on line %d
187 Warning: mb_substr(): Unknown encoding "" in %s on line %d
[all …]
H A Dmb_substr_basic.phpt2 Test mb_substr() function : basic functionality
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
12 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
18 * Test Basic Functionality of mb_substr with ASCII characters and multibyte strings.
21 echo "*** Testing mb_substr() : basic functionality ***\n";
28 var_dump(mb_substr($string_ascii, 3));
31 var_dump(mb_substr($string_ascii, 3, 5, 'ISO-8859-1'));
34 $result_1 = mb_substr($string_mb, 2, 7);
38 $result_2 = mb_substr($string_mb, 2, 7, 'utf-8');
44 *** Testing mb_substr() : basic functionality ***
H A Dmb_substr_error2.phpt2 Test mb_substr() function : error conditions - Pass an unknown encoding
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Pass an unknown encoding to mb_substr() to test behaviour
19 echo "*** Testing mb_substr() : error conditions ***\n";
26 var_dump( mb_substr($str, $start, $length, $encoding));
31 *** Testing mb_substr() : error conditions ***
33 Warning: mb_substr(): Unknown encoding "unknown-encoding" in %s on line %d
H A Dbug66797.phpt2 Bug #66797 (mb_substr only takes 32-bit signed integer)
11 mb_substr('bar', 0, 0x7fffffff),
12 mb_substr('bar', 0, 0x80000000),
13 mb_substr('bar', 0xffffffff, 1),
14 mb_substr('bar', 0x100000000, 1)
H A Dmb_substr_variation1.phpt2 Test mb_substr() function : usage variations - pass unexpected arguments (including strings) in pla…
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Pass different data types as $str to mb_substr() to test behaviour
19 echo "*** Testing mb_substr() : usage variations ***\n";
93 // loop through each element of $inputs to check the behavior of mb_substr()
97 var_dump( mb_substr($input, $start, $length));
105 *** Testing mb_substr() : usage variations ***
178 Warning: mb_substr() expects parameter 1 to be string, resource given in %s on line %d
H A Dmb_substr.phpt2 mb_substr()
17 print "1: ". bin2hex(mb_substr($euc_jp, 10, 10,'EUC-JP')) . "\n";
18 print "2: ". bin2hex(mb_substr($euc_jp, 0, 100,'EUC-JP')) . "\n";
20 $str = mb_substr($euc_jp, 100, 10,'EUC-JP');
24 $str = mb_substr($euc_jp, -100, 10,'EUC-JP');
H A Dmb_substr_variation4.phpt2 Test mb_substr() function : usage variations - pass different integers to $start arg
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Test how mb_substr() behaves when passed a range of integers as $start argument
19 echo "*** Testing mb_substr() : usage variations ***\n";
38 $a = mb_substr($string_ascii, $i, 4);
41 $b = mb_substr($string_mb, $i, 4, 'UTF-8');
53 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation5.phpt2 Test mb_substr() function : usage variations - pass different integers to $length arg
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Test how mb_substr() behaves when passed a range of integers as $length argument
19 echo "*** Testing mb_substr() : usage variations ***\n";
39 $a = mb_substr($string_ascii, 1, $i);
42 $b = mb_substr($string_mb, 1, $i, 'UTF-8');
54 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation6.phpt2 Test mb_substr() function : usage variations - pass different integers to $start arg
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Test how mb_substr() behaves when passed a range of integers as $start argument
19 echo "*** Testing mb_substr() : usage variations ***\n";
38 $a = mb_substr($string_ascii, $i, 4);
46 $b = mb_substr($string_mb, $i, 4, 'UTF-8');
58 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation7.phpt2 Test mb_substr() function : usage variations - pass different integers to $length arg
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
16 * Test how mb_substr() behaves when passed a range of integers as $length argument
19 echo "*** Testing mb_substr() : usage variations ***\n";
39 $a = mb_substr($string_ascii, 1, $i);
47 $b = mb_substr($string_mb, 1, $i, 'UTF-8');
59 *** Testing mb_substr() : usage variations ***
H A Dbug54494.phpt2 Bug #54494: mb_substr() mishandles UTF-32LE and UCS-2LE
25 $t = unpack("H*",mb_substr($string, $i, 1, $mode));
41 $t = unpack("H*",mb_substr($string, $i, 1, $mode));
H A Dmb_get_info.phpt58 string(9) "mb_substr"
122 string(9) "mb_substr"
148 string(9) "mb_substr"
H A Dmb_substr_variation3.phpt2 Test mb_substr() function : usage variations - test different encodings
6 function_exists('mb_substr') or die("skip mb_substr() is not available in this build");
10 /* Prototype : string mb_substr(string $str, int $start [, int $length [, string $encoding]])
21 echo "*** Testing mb_substr() : usage variations ***\n";
91 if (mb_substr($string_ascii, 1, 5, $enc)) {
98 if (mb_substr($string_mb, 1, 5, $enc)) {
108 *** Testing mb_substr() : usage variations ***
H A Dmb_str_functions_opt-parameter.phpt15 echo mb_substr('foobarbaz', 6, null, 'UTF-8') . "\n";
/PHP-7.2/ext/pdo_oci/tests/
H A Dbug60994.phpt39 $start1 = mb_substr($stream1, 0, 10);
40 $ending1 = mb_substr($stream1, -10);
56 $start2 = mb_substr($stream2, 0, 10);
57 $ending2 = mb_substr($stream2, -10);
73 $start3 = mb_substr($stream3, 0, 10);
74 $ending3 = mb_substr($stream3, -10);
90 $start4 = mb_substr($stream4, 0, 10);
91 $ending4 = mb_substr($stream4, -10);
/PHP-7.2/ext/oci8/tests/
H A Dbug70700.phpt58 $start1a = mb_substr($stream1a, 0, 10);
59 $ending1a = mb_substr($stream1a, -10);
89 $start2a = mb_substr($stream2a, 0, 10);
90 $ending2a = mb_substr($stream2a, -10);
120 $start3a = mb_substr($stream3a, 0, 10);
121 $ending3a = mb_substr($stream3a, -10);
151 $start4a = mb_substr($stream4a, 0, 10);
152 $ending4a = mb_substr($stream4a, -10);
/PHP-7.2/ext/mbstring/
H A Dmbstring.h116 PHP_FUNCTION(mb_substr);
H A Dmbstring.c561 PHP_FE(mb_substr, arginfo_mb_substr)
2897 PHP_FUNCTION(mb_substr) in PHP_FUNCTION() argument
/PHP-7.2/
H A DNEWS2804 . Fixed bug #66797 (mb_substr only takes 32-bit signed integer). (cmb)

Completed in 33 milliseconds