/PHP-7.3/ext/standard/tests/strings/ |
H A D | strrpos_negative_offset.phpt | 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_variation8.phpt | 2 Test strrpos() function : usage variations - repetitive chars for 'haystack' argument 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 … Test strrpos() function with strings containing multiple occurrences of 'needle' in the 'haystack' 15 $haystack = "ababababAbaBa"; 18 /* loop through to consider various offsets in getting the position of the needle in haystack strin… 20 for($offset = -1; $offset <= strlen($haystack); $offset++ ) { 22 var_dump( strrpos($haystack, $needle, $offset) );
|
H A D | bug60801.phpt | 5 $haystack = "foob\x00ar"; 8 var_dump(strpbrk($haystack, 'ar')); 9 var_dump(strpbrk($haystack, "\x00")); 10 var_dump(strpbrk($haystack, $needle)); 14 var_dump(strpbrk($haystack, 'xyz'));
|
H A D | strripos_basic1.phpt | 5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack' 15 echo "\n-- regular string for haystack & needle --\n"; 26 echo "\n-- heredoc string for haystack & needle --\n"; 36 -- regular string for haystack & needle -- 47 -- heredoc string for haystack & needle --
|
H A D | strrpos_variation13.phpt | 5 /* Prototype : int strrpos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 15 $haystack = "\0Hello\0World\0"; 28 var_dump( strrpos($haystack, $needles[$index]) ); 29 var_dump( strrpos($haystack, $needles[$index], $index) );
|
H A D | strrchr_basic.phpt | 5 /* Prototype : string strrchr(string $haystack, string $needle); 12 var_dump( strrchr("Hello, World", "Hello") ); //needle as a first word of haystack 20 //needle as second word of haystack 28 var_dump( strrchr("Hello, World", "Hello, World") ); //needle as haystack 33 //multiple existence of needle in haystack 37 var_dump( strrchr("Hello, World", "Zzzz") ); //non-existent needle in haystack
|
H A D | strripos_basic2.phpt | 5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack' 15 echo "\n-- regular string for haystack & needle, with various offsets --\n"; 21 echo "\n-- heredoc string for haystack & needle, with various offsets --\n"; 42 -- regular string for haystack & needle, with various offsets -- 48 -- heredoc string for haystack & needle, with various offsets --
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function by passing double quoted strings for 'haystack' & 'needle' arguments */ 13 $haystack = "Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 "; 62 $haystack //haystack as needle 65 /* loop through to get the position of the needle in haystack string */ 69 var_dump( strrpos($haystack, $needle[$index]) ); 70 var_dump( strrpos($haystack, $needle[$index], $index) );
|
H A D | strrchr_variation7.phpt | 2 Test strrchr() function : usage variations - heredoc string containing blank line for 'haystack' 5 /* Prototype : string strrchr(string $haystack, string $needle); 11 * blank-line for haystack and with various needles 26 $blank_line //needle as haystack
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function by passing heredoc string containing escape chars for haystack
|
H A D | strpbrk_error.phpt | 5 /* Prototype : array strpbrk(string haystack, string char_list) 13 $haystack = 'This is a Simple text.'; 18 var_dump( strpbrk($haystack, $char_list, $extra_arg) ); 21 var_dump( strpbrk($haystack) ); 24 var_dump( strpbrk($haystack, '') ); 27 var_dump( strpbrk($haystack, array('a', 'b', 'c') ) );
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 13 $haystack = 'Hello,\t\n\0\n $&!#%()*<=>?@hello123456he \x234 \101 '; 63 $haystack //haystack as needle 66 /* loop through to get the position of the needle in haystack string */ 70 var_dump( strrpos($haystack, $needle[$index]) ); 71 var_dump( strrpos($haystack, $needle[$index], $index) );
|
H A D | strrchr_variation3.phpt | 2 Test strrchr() function : usage variations - multi line heredoc string for 'haystack' 5 /* Prototype : string strrchr(string $haystack, string $needle); 10 /* Test strrchr() function by passing multi-line heredoc string for haystack and 25 $multi_line_str //needle as haystack
|
H A D | strripos_variation5.phpt | 2 Test strripos() function : usage variations - heredoc string containing escape chars for 'haystack'… 5 /* Prototype : int strripos ( string $haystack, string $needle [, int $offset] ); 6 * Description: Find position of last occurrence of a case-insensitive 'needle' in a 'haystack' 10 /* Test strripos() function by passing heredoc string containing escape chars for haystack
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function with null terminated strings for 'haystack' argument
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function by passing multi-line heredoc string for haystack and
|
/PHP-7.3/ext/intl/tests/ |
H A D | bug61860.phpt | 7 $haystack = 'Auf der Straße nach Paris habe ich mit dem Fahrer gesprochen'; 9 grapheme_stripos($haystack, 'pariS '), 10 grapheme_stristr($haystack, 'paRis '), 11 grapheme_substr($haystack, grapheme_stripos($haystack, 'Paris'))
|
/PHP-7.3/ext/intl/grapheme/ |
H A D | grapheme_string.c | 112 char *haystack, *needle; in PHP_FUNCTION() local 146 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION() 155 RETURN_LONG(found - haystack); in PHP_FUNCTION() 175 char *haystack, *needle; in PHP_FUNCTION() local 245 char *haystack, *needle; in PHP_FUNCTION() local 308 char *haystack, *needle; in PHP_FUNCTION() local 596 char *haystack, *needle; in strstr_common_handler() local 623 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler() 632 size_t found_offset = found - haystack; in strstr_common_handler() 635 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler() [all …]
|
/PHP-7.3/ext/mbstring/tests/ |
H A D | mb_stripos_basic2.phpt | 10 /* Prototype : int mb_stripos(string haystack, string needle [, int offset [, string encoding]]) 58 foreach ($ascii_haystacks as $haystack) { 59 var_dump(mb_stripos($haystack, $needle)); 60 var_dump(mb_stripos($haystack, $needle, 6)); 66 foreach ($greek_haystacks as $haystack) { 67 var_dump(mb_stripos($haystack, $needle)); 68 var_dump(mb_stripos($haystack, $needle, 4));
|
H A D | mb_strripos_basic2.phpt | 10 /* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]]) 58 foreach ($ascii_haystacks as $haystack) { 59 var_dump(mb_strripos($haystack, $needle)); 60 var_dump(mb_strripos($haystack, $needle, 14)); 66 foreach ($greek_haystacks as $haystack) { 67 var_dump(mb_strripos($haystack, $needle)); 68 var_dump(mb_strripos($haystack, $needle, 12));
|
H A D | mb_strripos_variation5_Bug45923.phpt | 10 /* Prototype : int mb_strripos(string haystack, string needle [, int offset [, string encoding]]) 77 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 81 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 87 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 91 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 97 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 101 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 107 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d 111 Warning: mb_strripos(): Offset is greater than the length of haystack string in %s on line %d
|
H A D | bug43841.phpt | 10 /* Prototype : int mb_strrpos(string $haystack, string $needle [, int $offset [, string $encoding]… 40 Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 45 Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 49 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d 55 Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 60 Warning: mb_strrpos(): Offset is greater than the length of haystack string in %s on line %d 64 Warning: strrpos(): Offset is greater than the length of haystack string in %s on line %d
|
H A D | mb_substr_count_variation4.phpt | 2 Test mb_substr_count() function : variation - pass a $needle that overlaps in $haystack 10 /* Prototype : int mb_substr_count(string $haystack, string $needle [, string $encoding]) 16 * Pass mb_substr_count() a $needle that overlaps in $haystack and see whether 26 var_dump(mb_substr_count($string_ascii, 'abcabc')); //needle overlaps in haystack
|
/PHP-7.3/ext/standard/tests/array/ |
H A D | array_search_variation2.phpt | 2 Test array_search() function : usage variations - different haystack values 6 * Prototype : mixed array_search ( mixed $needle, array $haystack [, bool $strict] ) 7 …* Description: Searches haystack for needle and returns the key if it is found in the array, FALSE… 11 /* Test array_search() with different possible haystack values */ 13 echo "*** Testing array_search() with different haystack values ***\n"; 53 *** Testing array_search() with different haystack values ***
|
H A D | in_array_variation2.phpt | 2 Test in_array() function : usage variations - different haystack values 6 * Prototype : bool in_array ( mixed $needle, array $haystack [, bool $strict] ) 7 * Description: Searches haystack for needle and returns TRUE 12 /* Test in_array() with different possible haystack values */ 14 echo "*** Testing in_array() with different haystack values ***\n"; 53 *** Testing in_array() with different haystack values ***
|