/PHP-7.2/ext/intl/doc/ |
H A D | grapheme_api.php | 31 * @param string $haystack The string to look in 38 function grapheme_strpos($haystack, $needle, $offset = 0) {} argument 43 * @param string $haystack The string to look in 50 function grapheme_stripos($haystack, $needle, $offset = 0) {} argument 55 * @param string $haystack The string to look in 62 function grapheme_strrpos($haystack, $needle, $offset = 0) {} argument 67 * @param string $haystack The string to look in 74 function grapheme_strripos($haystack, $needle, $offset = 0) {} argument 98 * @param string $haystack The input string. 109 * @param string $haystack The input string. [all …]
|
/PHP-7.2/ext/standard/tests/strings/ |
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 | 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 | 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_variation1.phpt | 2 Test strripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argum… 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 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( strripos($haystack, $needle) ); 70 var_dump( strripos($haystack, $needle, 1) ); 71 var_dump( strripos($haystack, $needle, 20) ); [all …]
|
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 | 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 | 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 | strripos_variation2.phpt | 2 Test strripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argum… 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 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( strripos($haystack, $needle) ); 71 var_dump( strripos($haystack, $needle, 1) ); 72 var_dump( strripos($haystack, $needle, 20) ); [all …]
|
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 | stripos_variation2.phpt | 2 Test stripos() function : usage variations - single quoted strings for 'haystack' & 'needle' argume… 5 /* Prototype : int stripos ( string $haystack, string $needle [, int $offset] ); 10 /* Test stripos() function by passing single quoted strings to 'haystack' & 'needle' arguments */ 13 $haystack = 'Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 '; 73 $haystack //haystack as needle 76 /* loop through to get the position of the needle in haystack string */ 80 var_dump( stripos($haystack, $needle[$index]) ); 81 var_dump( stripos($haystack, $needle[$index], $index) );
|
H A D | stripos_variation1.phpt | 2 Test stripos() function : usage variations - double quoted strings for 'haystack' & 'needle' argume… 5 /* Prototype : int stripos ( string $haystack, string $needle [, int $offset] ); 10 /* Test stripos() function by passing double quoted strings for 'haystack' & 'needle' arguments */ 13 $haystack = "Hello,\t\n\0\n $&!#%\o,()*+-./:;<=>?@hello123456he \x234 \101 "; 71 $haystack //haystack as needle 74 /* loop through to get the position of the needle in haystack string */ 78 var_dump( stripos($haystack, $needle[$index]) ); 79 var_dump( stripos($haystack, $needle[$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 | strrchr_variation8.phpt | 2 Test strrchr() function : usage variations - empty heredoc string for 'haystack' 5 /* Prototype : string strrchr(string $haystack, string $needle); 10 /* Test strrchr() function by passing empty heredoc string for haystack 24 $empty_str //needle as haystack
|
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] ); 6 * Description: Find position of last occurrence of 'needle' in 'haystack'. 10 /* Test strrpos() function by passing empty heredoc string 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 | 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
|
/PHP-7.2/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.2/ext/intl/grapheme/ |
H A D | grapheme_string.c | 109 char *haystack, *needle; in PHP_FUNCTION() local 143 found = php_memnstr(haystack + noffset, needle, needle_len, haystack + haystack_len); in PHP_FUNCTION() 152 RETURN_LONG(found - haystack); in PHP_FUNCTION() 207 haystack_dup = estrndup(haystack, haystack_len); in PHP_FUNCTION() 241 char *haystack, *needle; in PHP_FUNCTION() local 304 char *haystack, *needle; in PHP_FUNCTION() local 592 char *haystack, *needle; in strstr_common_handler() local 619 found = php_memnstr(haystack, needle, needle_len, haystack + haystack_len); in strstr_common_handler() 628 size_t found_offset = found - haystack; in strstr_common_handler() 631 RETURN_STRINGL(haystack, found_offset); in strstr_common_handler() [all …]
|
/PHP-7.2/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
|
/PHP-7.2/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 ***
|