/php-src/ext/mbstring/tests/ |
H A D | mb_substr.phpt | 2 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 D | mb_substr_basic.phpt | 2 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 D | gh16360.phpt | 2 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 D | mb_substr_error2.phpt | 2 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 D | bug66797.phpt | 2 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 D | mb_substr_variation4.phpt | 2 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 D | mb_substr_variation5.phpt | 2 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 D | mb_substr_variation6.phpt | 2 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 D | mb_substr_variation7.phpt | 2 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 D | bug54494.phpt | 2 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 D | mb_str_unknown_encoding.phpt | 132 mb_substr('coudenys', 0, null, 'UTF-0'); 165 mb_substr(): Argument #4 ($encoding) must be a valid encoding, "UTF-0" given
|
H A D | mb_strimwidth.phpt | 176 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 D | mb_str_functions_opt-parameter.phpt | 15 echo mb_substr('foobarbaz', 6, null, 'UTF-8') . "\n";
|
H A D | mb_str_pad.phpt | 75 // Taken from mb_substr.phpt
|
/php-src/ext/mbstring/ |
H A D | mbstring_arginfo.h | 317 ZEND_FUNCTION(mb_substr); 386 ZEND_FE(mb_substr, arginfo_mb_substr)
|
H A D | mbstring.stub.php | 114 function mb_substr(string $string, int $start, ?int $length = null, ?string $encoding = null): stri… function
|
H A D | mbstring.c | 2314 PHP_FUNCTION(mb_substr) in PHP_FUNCTION() argument
|