Home
last modified time | relevance | path

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

/PHP-8.3/ext/mbstring/tests/
H A Dmb_substr.phpt2 mb_substr()
31 $str = mb_substr($euc_jp, 100, 10, 'EUC-JP');
34 $str = mb_substr($euc_jp, -100, 10, 'EUC-JP');
94 print "1: " . mb_substr($hz, 0, 3, 'HZ') . "\n";
95 print "2: " . mb_substr($hz, -1, null, 'HZ') . "\n";
96 print "3: " . mb_substr($hz, -5, 3, 'HZ') . "\n";
97 print "4: " . mb_substr($hz, 1, null, 'HZ') . "\n";
98 print "5:" . mb_substr($hz, 10, 0, 'HZ') . "\n";
101 print "1: " . mb_substr($utf8, 0, 3, 'UTF-8') . "\n";
127 $out = mb_substr($data, 0, $pos, "UTF-8");
[all …]
H A Dmb_substr_basic.phpt2 Test mb_substr() function : basic functionality
10 * Test Basic Functionality of mb_substr with ASCII characters and multibyte strings.
13 echo "*** Testing mb_substr() : basic functionality ***\n";
20 var_dump(mb_substr($string_ascii, 3));
23 var_dump(mb_substr($string_ascii, 3, 5, 'ISO-8859-1'));
26 $result_1 = mb_substr($string_mb, 2, 7);
30 $result_2 = mb_substr($string_mb, 2, 7, 'utf-8');
36 *** Testing mb_substr() : basic functionality ***
H A Dgh16360.phpt2 GH-16320 mb_substr overflow from negative length
8 mb_substr("abcd", PHP_INT_MIN, 4, "UTF-8");
13 mb_substr("abcd", 0, PHP_INT_MIN, "UTF-8");
17 var_dump(mb_substr("abcd", PHP_INT_MAX, PHP_INT_MAX, "UTF-8"));
20 mb_substr(): Argument #2 ($start) must be between %s and %s
21 mb_substr(): Argument #3 ($length) must be between %s and %s
H A Dmb_substr_error2.phpt2 Test mb_substr() function : error conditions - Pass an unknown encoding
8 * Pass an unknown encoding to mb_substr() to test behaviour
11 echo "*** Testing mb_substr() : error conditions ***\n";
19 var_dump( mb_substr($str, $start, $length, $encoding));
26 *** Testing mb_substr() : error conditions ***
27 mb_substr(): Argument #4 ($encoding) must be a valid encoding, "unknown-encoding" given
H A Dbug66797.phpt2 Bug #66797 (mb_substr only takes 32-bit signed integer)
12 mb_substr('bar', 0, 0x7fffffff),
13 mb_substr('bar', 0, 0x80000000),
14 mb_substr('bar', 0xffffffff, 1),
15 mb_substr('bar', 0x100000000, 1)
H A Dmb_substr_variation4.phpt2 Test mb_substr() function : usage variations - pass different integers to $start arg
8 * Test how mb_substr() behaves when passed a range of integers as $start argument
11 echo "*** Testing mb_substr() : usage variations ***\n";
30 $a = mb_substr($string_ascii, $i, 4);
33 $b = mb_substr($string_mb, $i, 4, 'UTF-8');
45 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation5.phpt2 Test mb_substr() function : usage variations - pass different integers to $length arg
8 * Test how mb_substr() behaves when passed a range of integers as $length argument
11 echo "*** Testing mb_substr() : usage variations ***\n";
31 $a = mb_substr($string_ascii, 1, $i);
34 $b = mb_substr($string_mb, 1, $i, 'UTF-8');
46 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation6.phpt2 Test mb_substr() function : usage variations - pass different integers to $start arg
8 * Test how mb_substr() behaves when passed a range of integers as $start argument
11 echo "*** Testing mb_substr() : usage variations ***\n";
30 $a = mb_substr($string_ascii, $i, 4);
38 $b = mb_substr($string_mb, $i, 4, 'UTF-8');
50 *** Testing mb_substr() : usage variations ***
H A Dmb_substr_variation7.phpt2 Test mb_substr() function : usage variations - pass different integers to $length arg
8 * Test how mb_substr() behaves when passed a range of integers as $length argument
11 echo "*** Testing mb_substr() : usage variations ***\n";
31 $a = mb_substr($string_ascii, 1, $i);
39 $b = mb_substr($string_mb, 1, $i, 'UTF-8');
51 *** 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_str_unknown_encoding.phpt132 mb_substr('coudenys', 0, null, 'UTF-0');
165 mb_substr(): Argument #4 ($encoding) must be a valid encoding, "UTF-0" given
H A Dmb_strimwidth.phpt176 if (mb_substr($result, 0, 1, 'ASCII') !== mb_substr($str, $from, 1, 'ASCII'))
186 if (mb_substr($result, -3, 3, 'ASCII') !== '...')
188 if (mb_substr($result, -4, 1, 'ASCII') !== mb_substr($str, $width-4, 1, 'ASCII'))
H A Dmb_str_functions_opt-parameter.phpt15 echo mb_substr('foobarbaz', 6, null, 'UTF-8') . "\n";
H A Dmb_str_pad.phpt75 // Taken from mb_substr.phpt
/PHP-8.3/ext/oci8/tests/
H A Dbug70700.phpt61 $start1a = mb_substr($stream1a, 0, 10);
62 $ending1a = mb_substr($stream1a, -10);
92 $start2a = mb_substr($stream2a, 0, 10);
93 $ending2a = mb_substr($stream2a, -10);
123 $start3a = mb_substr($stream3a, 0, 10);
124 $ending3a = mb_substr($stream3a, -10);
154 $start4a = mb_substr($stream4a, 0, 10);
155 $ending4a = mb_substr($stream4a, -10);
/PHP-8.3/ext/pdo_oci/tests/
H A Dbug60994.phpt42 $start1 = mb_substr($stream1, 0, 10);
43 $ending1 = mb_substr($stream1, -10);
62 $start2 = mb_substr($stream2, 0, 10);
63 $ending2 = mb_substr($stream2, -10);
82 $start3 = mb_substr($stream3, 0, 10);
83 $ending3 = mb_substr($stream3, -10);
102 $start4 = mb_substr($stream4, 0, 10);
103 $ending4 = mb_substr($stream4, -10);
/PHP-8.3/ext/mbstring/
H A Dmbstring_arginfo.h334 ZEND_FUNCTION(mb_substr);
429 ZEND_FE(mb_substr, arginfo_mb_substr)
H A Dmbstring.stub.php114 function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): stri… function
H A Dmbstring.c2309 PHP_FUNCTION(mb_substr) in PHP_FUNCTION() argument
/PHP-8.3/
H A DNEWS137 . Fixed bug GH-16361 (mb_substr overflow on start/length arguments).
1007 . When operating on a string with invalid encoding, mb_substr (as well

Completed in 38 milliseconds