/PHP-7.2/ext/standard/tests/strings/ |
H A D | strrpos.phpt | 2 strrpos() function 5 var_dump(strrpos("test test string", "test")); 9 var_dump(strrpos("test string", "g")); 10 var_dump(strrpos("te".chr(0)."st", chr(0))); 11 var_dump(strrpos("tEst", "test")); 12 var_dump(strrpos("teSt", "test")); 13 var_dump(@strrpos("foo", "f", 1)); 14 var_dump(@strrpos("", "")); 15 var_dump(@strrpos("a", "")); 16 var_dump(@strrpos("", "a")); [all …]
|
H A D | strrpos_basic2.phpt | 17 var_dump( strrpos("Hello, World", "Hello", 0) ); 18 var_dump( strrpos("Hello, World", 'Hello', 1) ); 19 var_dump( strrpos('Hello, World', 'World', 1) ); 20 var_dump( strrpos('Hello, World', "World", 5) ); 24 var_dump( strrpos($heredoc_str, 'Hello', 0) ); 25 var_dump( strrpos($heredoc_str, 'Hello', 1) ); 26 var_dump( strrpos($heredoc_str, $heredoc_str, 0) ); 27 var_dump( strrpos($heredoc_str, $heredoc_str, 1) ); 30 var_dump( strrpos("Hello, World", "o", 3) ); 31 var_dump( strrpos("Hello, World", "o", 6) ); [all …]
|
H A D | strrpos_offset.phpt | 2 strrpos() offset integer overflow 8 var_dump(strrpos("t", "t", PHP_INT_MAX+1)); 9 var_dump(strrpos("tttt", "tt", PHP_INT_MAX+1)); 10 var_dump(strrpos(100, 101, PHP_INT_MAX+1)); 11 var_dump(strrpos(1024, 1024, PHP_INT_MAX+1)); 12 var_dump(strrpos(1024, 1024, -PHP_INT_MAX)); 13 var_dump(strrpos(1024, "te", -PHP_INT_MAX)); 14 var_dump(strrpos(1024, 1024, -PHP_INT_MAX-1)); 15 var_dump(strrpos(1024, "te", -PHP_INT_MAX-1)); 20 Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d [all …]
|
H A D | strrpos_basic1.phpt | 2 Test strrpos() function : basic functionality - with default arguments 17 var_dump( strrpos("Hello, World", "Hello") ); 18 var_dump( strrpos('Hello, World', "hello") ); 19 var_dump( strrpos("Hello, World", 'World') ); 20 var_dump( strrpos('Hello, World', 'WORLD') ); 23 var_dump( strrpos("Hello, World", "o") ); 24 var_dump( strrpos("Hello, World", ",") ); 27 var_dump( strrpos($heredoc_str, "Hello, World") ); 28 var_dump( strrpos($heredoc_str, 'Hello') ); 29 var_dump( strrpos($heredoc_str, $heredoc_str) ); [all …]
|
H A D | strrpos_variation4.phpt | 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing heredoc string containing special chars for haystack 14 echo "*** Testing strrpos() function: with heredoc strings ***\n"; 21 var_dump( strrpos($special_chars_str, "Ex'ple", 0) ); 22 var_dump( strrpos($special_chars_str, "!@@!", 23) ); 23 var_dump( strrpos($special_chars_str, '_') ); 24 var_dump( strrpos($special_chars_str, '("_")') ); 25 var_dump( strrpos($special_chars_str, "$*") ); 26 var_dump( strrpos($special_chars_str, "$*", 10) ); 27 var_dump( strrpos($special_chars_str, "(special)") ); [all …]
|
H A D | strrpos_variation3.phpt | 2 Test strrpos() function : usage variations - multi line heredoc string for 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing multi-line heredoc string for haystack and 14 echo "*** Testing strrpos() function: with heredoc strings ***\n"; 21 var_dump( strrpos($multi_line_str, "ing", 0) ); 22 var_dump( strrpos($multi_line_str, "ing", 15) ); 23 var_dump( strrpos($multi_line_str, "ing", 22) ); 24 var_dump( strrpos($multi_line_str, "") ); 25 var_dump( strrpos($multi_line_str, " ") ); 30 *** Testing strrpos() function: with heredoc strings ***
|
H A D | strrpos_variation7.phpt | 2 Test strrpos() function : usage variations - empty heredoc string for 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing empty heredoc string for haystack 14 echo "*** Testing strrpos() function: with heredoc strings ***\n"; 18 var_dump( strrpos($empty_string, "") ); 19 var_dump( strrpos($empty_string, "", 1) ); 20 var_dump( strrpos($empty_string, FALSE) ); 21 var_dump( strrpos($empty_string, NULL) ); 26 *** Testing strrpos() function: with heredoc strings ***
|
H A D | strrpos_variation5.phpt | 2 Test strrpos() function : usage variations - heredoc string containing escape chars for 'haystack' … 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing heredoc string containing escape chars for haystack 14 echo "*** Testing strrpos() function: with heredoc strings ***\n"; 20 var_dump( strrpos($control_char_str, "\n") ); 21 var_dump( strrpos($control_char_str, "\t") ); 22 var_dump( strrpos($control_char_str, "\n", 12) ); 23 var_dump( strrpos($control_char_str, "\t", 15) ); 28 *** Testing strrpos() function: with heredoc strings ***
|
H A D | strrpos_error.phpt | 2 Test strrpos() function : error conditions 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 echo "*** Testing strrpos() function: error conditions ***"; 12 var_dump( strrpos() ); 15 var_dump( strrpos("String") ); 18 var_dump( strrpos("string", "String", 1, 'extra_arg') ); 22 *** Testing strrpos() function: error conditions *** 24 Warning: strrpos() expects at least 2 parameters, 0 given in %s on line %d 28 Warning: strrpos() expects at least 2 parameters, 1 given in %s on line %d 32 Warning: strrpos() expects at most 3 parameters, 4 given in %s on line %d
|
H A D | strrpos_variation6.phpt | 2 Test strrpos() function : usage variations - heredoc string containing quotes for 'haystack' argume… 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing heredoc string containing quotes for haystack 14 echo "*** Testing strrpos() function: with heredoc strings ***\n"; 22 var_dump( strrpos($quote_char_str, "line") ); 23 var_dump( strrpos($quote_char_str, 'things') ); 24 var_dump( strrpos($quote_char_str, 'things', 0) ); 25 var_dump( strrpos($quote_char_str, "things", 20) ); 29 *** Testing strrpos() function: with heredoc strings ***
|
H A D | strrpos_negative_offset.phpt | 5 var_dump(strrpos("haysthack", 'ha', -9)); 6 var_dump(strrpos("haystack", 'h', -8)); 7 var_dump(strrpos("haystack", 'k', -1)); 8 var_dump(strrpos("haystack", "ka", -1)); 9 var_dump(strrpos("haystack", 'a', -3)); 10 var_dump(strrpos("haystack", 'a', -4)); 11 var_dump(@strrpos("haystack", 'h', -9));
|
H A D | strrpos_variation15.phpt | 7 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 81 // loop through each element of the array and check the working of strrpos() 85 var_dump( strrpos($values[$index], $values[$index], $values[$index]) ); 115 Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d 123 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 127 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 131 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 135 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 139 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 151 Warning: strrpos() expects parameter 3 to be integer, object given in %s on line %d [all …]
|
H A D | strrpos_variation14.phpt | 2 Test strrpos() function : usage variations - unexpected inputs for 'offset' argument 7 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 12 /* Test strrpos() function with unexpected inputs for 'offset' argument */ 14 echo "*** Testing strrpos() function: with unexpected values for offset ***\n"; 79 // loop through each element of the array and check the working of strrpos() 83 var_dump( strrpos($haystack, $needle, $offsets[$index]) ); 90 *** Testing strrpos() function: with unexpected values for offset *** 97 Warning: strrpos() expects parameter 3 to be integer, float given in %s on line %d 105 Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d 109 Warning: strrpos() expects parameter 3 to be integer, array given in %s on line %d [all …]
|
H A D | strrpos_variation11.phpt | 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 79 // loop through each element of the array and check the working of strrpos() 84 var_dump( strrpos($values[$index], $values[$index]) ); 85 var_dump( strrpos($values[$index], $values[$index], 1) ); 92 *** Testing strrpos() function with unexpected values for haystack and needle *** 122 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 125 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 129 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 132 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 136 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d [all …]
|
H A D | strrpos_variation12.phpt | 2 Test strrpos() function : usage variations - checking binary safe with 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function with null terminated strings for 'haystack' argument 14 echo "*** Test strrpos() function: binary safe ***\n"; 26 var_dump( strrpos($haystacks[$index], "\0") ); 27 var_dump( strrpos($haystacks[$index], "\0", $index) ); 32 *** Test strrpos() function: binary safe ***
|
H A D | strrpos_variation13.phpt | 2 Test strrpos() function : usage variations - checking bianry safe with 'needle' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function with null terminated strings for 'needle' argument 14 echo "*** Test strrpos() function: binary safe ***\n"; 28 var_dump( strrpos($haystack, $needles[$index]) ); 29 var_dump( strrpos($haystack, $needles[$index], $index) ); 34 *** Test strrpos() function: binary safe ***
|
H A D | strrpos_variation9.phpt | 2 Test strrpos() function : usage variations - unexpected inputs for 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function with unexpected inputs for haystack argument */ 12 echo "*** Testing strrpos() function with unexpected values for haystack ***\n"; 80 // loop through each element of the array and check the working of strrpos() 84 var_dump( strrpos($haystacks[$index], $needle) ); 93 *** Testing strrpos() function with unexpected values for haystack *** 124 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 129 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d 134 Warning: strrpos() expects parameter 1 to be string, array given in %s on line %d [all …]
|
H A D | strrpos_variation10.phpt | 2 Test strrpos() function : usage variations - unexpected inputs for 'needle' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function with unexpected inputs for 'needle' and 14 echo "*** Testing strrpos() function with unexpected values for needle ***\n"; 86 var_dump( strrpos($haystack, $needles[$index]) ); 95 *** Testing strrpos() function with unexpected values for needle *** 116 Warning: strrpos(): needle is not a string or an integer in %s on line %d 120 Warning: strrpos(): needle is not a string or an integer in %s on line %d 124 Warning: strrpos(): needle is not a string or an integer in %s on line %d 128 Warning: strrpos(): needle is not a string or an integer in %s on line %d [all …]
|
H A D | strrpos_variation8.phpt | 2 Test strrpos() function : usage variations - repetitive chars for 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function with strings containing multiple occurrences of 'needle' in the 'haystac… 14 echo "*** Testing strrpos() function: strings repetitive chars ***\n"; 22 var_dump( strrpos($haystack, $needle, $offset) ); 28 *** Testing strrpos() function: strings repetitive chars ***
|
H A D | strrpos_variation1.phpt | 2 Test strrpos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume… 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing double quoted strings for 'haystack' & 'needle' arguments */ 12 echo "*** Testing strrpos() function: with double quoted strings ***\n"; 69 var_dump( strrpos($haystack, $needle[$index]) ); 70 var_dump( strrpos($haystack, $needle[$index], $index) ); 76 *** Testing strrpos() function: with double quoted strings ***
|
H A D | strrpos_variation2.phpt | 2 Test strrpos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume… 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 10 /* Test strrpos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 12 echo "*** Testing strrpos() function: with single quoted strings ***\n"; 70 var_dump( strrpos($haystack, $needle[$index]) ); 71 var_dump( strrpos($haystack, $needle[$index], $index) ); 77 *** Testing strrpos() function: with single quoted strings ***
|
H A D | bug40754.phpt | 22 var_dump(strrpos("abcde", "abc", $v)); 56 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
|
/PHP-7.2/ext/mbstring/tests/ |
H A D | bug43841.phpt | 32 echo "strrpos:\n"; 33 var_dump(strrpos('This is na English ta', 'a', $i)); 47 strrpos: 49 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 62 strrpos: 64 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 73 strrpos: 82 strrpos:
|
H A D | mb_get_info.phpt | 45 ["strrpos"]=> 109 ["strrpos"]=> 135 ["strrpos"]=>
|
H A D | bug45923.phpt | 25 section('strrpos' , "abc abc abc" , "abc"); 140 ------- strrpos ----------- 154 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 164 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
|